Author Topic: Caret style = Block and selections?  (Read 6406 times)

Offline VbCl8ye2vyFPaP0M

  • Single posting newcomer
  • *
  • Posts: 8
Caret style = Block and selections?
« on: January 10, 2021, 01:44:56 am »
I'm having a problem in version 20.03 when selecting text with the caret style set to block:
1. I press Shift+right arrow key. One char is selected, but unlike earlier versions the cursor DOESN'T move.
2. I press Shift+right arrow key again. 2 chars is selected, the cursor moves ONE step, that is it's blinking on top of the 2nd char of the selection instead of just after like it used to. It now looks exactly like version 17.12 used to look if you had only one less char selected, making it VERY easy to select one char too many.

Is this a bug? Or is there any way to change this behavior? It seems like when selecting towards the right the block caret is shown one char to the left of where it actually is supposed to be shown (to the left of where the line caret would be shown instead of to the right like it usually is placed).

Offline oBFusCATed

  • Developer
  • Lives here!
  • *****
  • Posts: 13413
    • Travis build status
Re: Caret style = Block and selections?
« Reply #1 on: January 10, 2021, 11:14:31 am »
Screenshot?
OS?
It works fine for me
(most of the time I ignore long posts)
[strangers don't send me private messages, I'll ignore them; post a topic in the forum, but first read the rules!]

Offline VbCl8ye2vyFPaP0M

  • Single posting newcomer
  • *
  • Posts: 8
Re: Caret style = Block and selections?
« Reply #2 on: January 11, 2021, 02:31:07 am »
I'm using Windows 7 x64

Image attached... I hope, the preview isn't showing it (otherwise try http://sema.boxathome.net/Shared%20Images/SEMA/CB_Carets.png).

Image information: Rows show various combinations of caret and C::B versions. Columns show: 1. Nothing selected, 2. 1 char selected, 3. 2 chars.

In all cases the status line show column 2 for nothing selected, column 3 for one char selected, column 4 for 2 chars selected. Note how version 20.3 with block cursor doesn't render the cursor where the status line says it should be.

Now that I've had time to think about it I seem to remember the same thing happening to NotePad++ a couple of years ago, don't you share your editor component with them?

Offline oBFusCATed

  • Developer
  • Lives here!
  • *****
  • Posts: 13413
    • Travis build status
Re: Caret style = Block and selections?
« Reply #3 on: January 11, 2021, 02:17:50 pm »
Do you have Direct2d enabled?
The settings is "Settings -> Editor -> General -> Other editor settings -> Techonology"

The rendering engine used by C::B and Notepad++ is different. We use wxWidgets based renderer, Notepad++ uses Win32.
(most of the time I ignore long posts)
[strangers don't send me private messages, I'll ignore them; post a topic in the forum, but first read the rules!]

Offline VbCl8ye2vyFPaP0M

  • Single posting newcomer
  • *
  • Posts: 8
Re: Caret style = Block and selections?
« Reply #4 on: January 11, 2021, 05:19:34 pm »
No, Settings -> Editor -> General -> Other editor settings -> Techonology was set to Default. The behavior is the same when set to DirectWrite.

I wasn't thinking of the rendering component, I was thinking of Scintilla (just couldn't remember the name). I just checked, the most recent NotePad++ also still has this behavior when using the block cursor.

Offline oBFusCATed

  • Developer
  • Lives here!
  • *****
  • Posts: 13413
    • Travis build status
Re: Caret style = Block and selections?
« Reply #5 on: January 11, 2021, 06:54:38 pm »
Scintilla has a generic part and platform specific part. The rendering is platform specific. What is the version of scintilla in Notepad++?  Ours is a modified version of 3.7.5. You could also try the latest scite to see if the behaviour is the same in 4.x releases of scintilla.
(most of the time I ignore long posts)
[strangers don't send me private messages, I'll ignore them; post a topic in the forum, but first read the rules!]

Offline VbCl8ye2vyFPaP0M

  • Single posting newcomer
  • *
  • Posts: 8
Re: Caret style = Block and selections?
« Reply #6 on: January 11, 2021, 07:31:58 pm »
Notepad++ doesn't mention the Scintilla version... or much of Scintilla at all. It does have a "SciLexer.DLL" that's version 4.2.0 and was apparently originally called scintilla.DLL.

SciTE 4.4.6 has the same behavior as NotePad++ and C::B 20.03.

I'm thinking this is a Scintilla issue and a check of https://sourceforge.net/p/scintilla/bugs/ reveals that it hasn't been reported, and that I can't access the "Create ticket" option :-(.

Offline oBFusCATed

  • Developer
  • Lives here!
  • *****
  • Posts: 13413
    • Travis build status
Re: Caret style = Block and selections?
« Reply #7 on: January 11, 2021, 09:12:21 pm »
"Create ticket" works to show the bug entering UI for my user.
Are you sure you're logged in sf.net?

You could also try to report this on their google group.
(most of the time I ignore long posts)
[strangers don't send me private messages, I'll ignore them; post a topic in the forum, but first read the rules!]

Offline VbCl8ye2vyFPaP0M

  • Single posting newcomer
  • *
  • Posts: 8
Re: Caret style = Block and selections?
« Reply #8 on: October 02, 2022, 03:17:04 am »
Scintilla (and NotePad++) has now fixed this bug (even though apparently they call it a feature! :-)  ). See information in https://github.com/notepad-plus-plus/notepad-plus-plus/issues/11944