Open Basic editor Edit one of the Application macro's. Go to the start of a line with multiple vars, expressions, * press Ctrl+Right > this selects _two_ strings should one found in Version: 24.8.0.0.alpha0+ (X86_64) / LibreOffice Community Build ID: 56767830b81fa21382b87cf43d78b1c73ca5dbd8 CPU threads: 8; OS: Linux 5.15; UI render: default; VCL: gtk3 Locale: en-US (en_US.UTF-8); UI: en-US Calc: threaded
This is actually a very old bug... Ctrl + Left/Right has never worked well for me in the Basic editor. For instance, consider the cursor is in the first position of the following line: Global oKeyHandler As Object If you press Ctrl+Right the cursor will go to the end of oKeyHandler. In any other code editor, the cursor would go to the beginning of oKeyHandler. I'd say the problem is in TextView::KeyInput, located in: /core/vcl/source/edit/textview.cxx
(In reply to Rafael Lima from comment #1) > This is actually a very old bug... Ctrl + Left/Right has never worked well > for me in the Basic editor. IIRC, it did for me... Starting (random) 5.0.6.3 shows it behaved as expected in that version > bibisectrequest. > ... > I'd say the problem is in TextView::KeyInput, located in: > /core/vcl/source/edit/textview.cxx Will look into that.
The regression started from the following commit, bibisected using repo bibisect-linux-64-7.0. Adding CC: to Andreas Heinisch. https://git.libreoffice.org/core/commit/992c2e82e29ed68e40fe61303d16762604003121 Author: Andreas Heinisch <andreas.heinisch@yahoo.de> AuthorDate: Sat Jan 11 11:54:52 2020 +0100 Commit: Noel Grandin <noel.grandin@collabora.co.uk> CommitDate: Tue Feb 11 17:39:52 2020 +0100 tdf#57879 - Expand word boundaries to include connector punctuations
Imho the implemetation of this feature is correct. However, consider the following line where the "|" indicates the position of the caret: |Global oKeyHandler As Object In the function TextView::CursorWordRight I call xBI->nextWord where the function positions the cursor after the oKeyHandler: Global oKeyHandler| As Object So, imho there is a problem in BreakIteratorImpl::nextWord where the startPos is 0: result = LBI->nextWord(Text, nStartPos, rLocale, rWordType); It should not jump over the next word if the cursor is at the beginning of a word.
Andreas Heinisch committed a patch related to this issue. It has been pushed to "master": https://git.libreoffice.org/core/commit/489613b93846d77a8ee33f5069f079c59dee563b tdf#160202 - Don't extend selection over two words It will be available in 25.2.0. The patch should be included in the daily builds available at https://dev-builds.libreoffice.org/daily/ in the next 24-48 hours. More information about daily builds can be found at: https://wiki.documentfoundation.org/Testing_Daily_Builds Affected users are encouraged to test the fix and report feedback.
Andreas Heinisch committed a patch related to this issue. It has been pushed to "libreoffice-24-8": https://git.libreoffice.org/core/commit/cfc3997498d71089ad8fd403a6969d803f926fb8 tdf#160202 - Don't extend selection over two words It will be available in 24.8.3. The patch should be included in the daily builds available at https://dev-builds.libreoffice.org/daily/ in the next 24-48 hours. More information about daily builds can be found at: https://wiki.documentfoundation.org/Testing_Daily_Builds Affected users are encouraged to test the fix and report feedback.