From 7cd648c143a47a9f7958274aee4588a33a24b0c5 Mon Sep 17 00:00:00 2001 From: Roland Heyder Date: Fri, 22 Sep 2023 00:34:19 +0200 Subject: [PATCH] Feature request see https://qb64phoenix.com/forum/showthread.php?tid=2017&pid=19971#pid19971 --- source/ide/ide_methods.bas | 12 +++--------- 1 file changed, 3 insertions(+), 9 deletions(-) diff --git a/source/ide/ide_methods.bas b/source/ide/ide_methods.bas index 80ee4c699..8fafa9121 100644 --- a/source/ide/ide_methods.bas +++ b/source/ide/ide_methods.bas @@ -3829,15 +3829,9 @@ FUNCTION ide2 (ignore) IF KB = KEY_HOME THEN GOSUB selectcheck - IF idecx <> 1 THEN - idecx = 1 - ELSE - a$ = idegetline(idecy) - idecx = 1 - FOR x = 1 TO LEN(a$) - IF ASC(a$, x) <> 32 THEN idecx = x: EXIT FOR - NEXT - END IF + a$ = idegetline(idecy): sot% = LEN(a$) 'get current line as is + a$ = LTRIM$(a$): sot% = sot% - LEN(a$) + 1 'calc start of text position + IF idecx = sot% THEN idecx = 1: ELSE idecx = sot% 'mimic N++ behavior GOTO specialchar END IF