Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Wrong cursor position when selecting text #1442

Open
klayman opened this issue Mar 22, 2017 · 15 comments
Open

Wrong cursor position when selecting text #1442

klayman opened this issue Mar 22, 2017 · 15 comments

Comments

@klayman
Copy link

klayman commented Mar 22, 2017

In Geany 1.30 selecting a text with shift+arrow or shift+home/end leaves the last symbol under the cursor selected. For me this behavior is not apparent.

For example, pressing shift+right arrow leaves the cursor at the same position, while the symbol under the cursor gets selected. In the earlier versions (perhaps, 1.29) the same key combo selected the current symbol and moved the cursor to the next symbol.

@elextr elextr added the can't reproduce A developer couldn't reproduce the issue label Mar 22, 2017
@elextr
Copy link
Member

elextr commented Mar 22, 2017

Works for me.

@klayman
Copy link
Author

klayman commented Mar 22, 2017

It should be reproducible with themes using block cursor, e.g. "Dark", "Retro" etc.

@elextr
Copy link
Member

elextr commented Mar 22, 2017

oh, block caret.

Selection and display of the caret is performed by the Scintilla editing component Geany uses, please check it with Scite, the Scintilla reference editor and report upstream if not already.

Note that IIUC block caret is not supported by the Scintilla maintainer, but an external implementer, and it hasn't had much love recently.

@elextr elextr added bug scintilla and removed can't reproduce A developer couldn't reproduce the issue labels Mar 22, 2017
@klayman
Copy link
Author

klayman commented Mar 23, 2017

Ok, I've created a ticket for Scintilla.

SciTE doesn't support block caret at all, unfortunately.

@elextr
Copy link
Member

elextr commented Mar 23, 2017

Looks like its deliberate, see https://sourceforge.net/p/scintilla/bugs/1924/

@klayman
Copy link
Author

klayman commented Mar 23, 2017

Yes, looks like so (this is the ticket I've created, by the way). There is a discussion on this topic on Google groups and I'll post my arguments for the old behavior.

@elextr
Copy link
Member

elextr commented Mar 23, 2017

this is the ticket I've created, by the way

Yes thats why I put a reference to it, so people could find it easy.

Let us know what the discussion decides so we can close this or not.

@AlbertoGP
Copy link

Hi, I've been bit by this issue too when using another Scintilla-based editor, and I'm proposing a fix in that Scintilla ticket: https://sourceforge.net/p/scintilla/bugs/1924/

@codebrainz
Copy link
Member

@AlbertoGP, FWIW you might want to make your changes to (or backport them to) Scintilla's LongTerm3 branch, since the HG tip requires bleeding edge compilers that support C++17 which was just finalized in the last couple weeks, so Scintilla-based editors you use might take a long time to get your changes if only done against HG tip.

@AlbertoGP
Copy link

After some discussion of alternatives, the simplest way for Textadept was to add a local patch that undoes the block cursor selection change that happened earlier this year:
https://foicica.com/lists/code/201710/4061.html

In case you'd like to do the same, I've made PR #1608 to first bring your scintilla_changes.patch up to date. The corresponding issue is #1606
Then, in another PR I would add the cursor block behaviour restoration to it.
The change that caused all this is quite simple to undo anyway: https://sourceforge.net/p/scintilla/code/ci/d29f1dad85ac3ec2a57c9341c5bd62a05c07d1e0/

@zufuliu
Copy link

zufuliu commented Jun 30, 2019

https://sourceforge.net/p/scintilla/bugs/1924/
was fixed in Scintilla 4.1.8.

@elextr
Copy link
Member

elextr commented Jun 30, 2019

@zufuliu was it backported to the long term 3 branch?

@zufuliu
Copy link

zufuliu commented Jun 30, 2019

@elextr not at the moment, but I think I will backported later.

@elextr
Copy link
Member

elextr commented Jun 30, 2019

Ok, Geany still uses the LTS branch, so it will get picked up after that happens.

@zufuliu
Copy link

zufuliu commented Sep 1, 2019

Scintilla 3.10.0 is available now.
https://scintilla.sourceforge.io/ScintillaHistory.html

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

No branches or pull requests

5 participants