Hi there. I am a notepad++ user.
In that program, we have block cursors that highlight the character the cursor is on. However, this cursor is only available for the insert mode, it is not there for the override mode which is really where it should be, and apparently can not be there because the override cursor is implemented from Scintilla and can't be changed.
Thus I would like to ask that the users are given the choice of using block caret highlighting cursors in the override mode here in scintilla. from here, it can be then easily introduced into notepad++ or other areas.
Or, if you know a way around this for displaying the block cursor for the override mode, please tell.
Thanks for considering my suggestion!
-SalviaSage
This seems like a reasonable feature if anyone is interested in implementing it.
Thanks for agreeing with me!
I am willing to do the testing for this implementation.
However, I can not code it.
If anyone is volunteering to work on this, please get in touch with me, thanks!
Is
SetCaretStyle(CARETSTYLE_BLOCK)not do this?Hi.
You moved this ticket to Committed --> Completed earlier.
However, it looks like the feature is still not in, or if it is in I do not know how to set it as such.
Can anyone help me with this?
Basically, we want the caret to be on top of the whole letter on the override mode instead of only being a small line under the letter.
There are a limited set of 'milestone's available for a feature request. 'Completed' is the initial default. It is changed to 'Committed' when code implementing the feature has been added to the Scintilla repository. No change has been committed so I reset the milestone to its default.
That's my fail.
I added the changes here. The block caret can be set by
SetCaretStyle(CARETSTYLE_BLOCK, true)
or SendMessage(hwnd, SCI_SETCARETSTYLE, CARETSTYLE_BLOCK, TRUE)
or execute(SCI_SETCARETSTYLE, CARETSTYLE_BLOCK, true)
maybe it's better to add new getter and setter.
Last edit: Zufu Liu 2019-01-27
That doesn't appear to be a sensible API to me as it has changed the meaning from a simple property to a conditional property.
Here are 2 better APIs:
# Using one extra enumeration. Simpler if there are unlikely to be more changes.
val CARETSTYLE_BLOCK_ALWAYS=3
Show block caret in all modes.
# Using separate fields of bits for normal and overstrike modes. Better if there may be additional choices for overstrike mode.
val CARETSTYLE_OVERSTRIKE_BAR=0
val CARETSTYLE_OVERSTRIKE_BLOCK=16
drawOverstrikeCaret should not be removed from EditView as it is needed by the curses platform.
Good find. I am eagerly waiting for the implementation of this feature. <3
Patch for CARETSTYLE_BLOCK_ALWAYS.
Should include change to documentation.
Thanks Zufu. Hopefully, it will be implemented soon.
And, can it be used in the INS mode also? (overwriting the letters)
This patch added a new caret settings for OVR mode, not affect INS mode.
Once committed, it requires Notepad++ to expose the new settings in Preferences -> Editing -> Caret Settings.
There is a logical error in the patch which may always draw a block caret in OVR mode.
need change to
or (always drawing block caret if
imeCaretBlockOverrideis set (for Korean IME))Updated, my update to the document may not precise.
Committed as [aba09a].
Related
Commit: [aba09a]
Hi.
Thanks for committing a ticket that I opened.
Now, How do I try this change from this end here?
thanks.
For Notepad++, personally I think what you can do is just continue wait on https://github.com/notepad-plus-plus/notepad-plus-plus/issues/4467
For Notepad2, you can try v4.19.02r1808 (View -> Caret Style) from https://github.com/zufuliu/notepad2/releases
I don't know how to configure SciTE (need build from latest source) and other Scintilla based editors (most of them use tagged release of Scintilla).
Last edit: Zufu Liu 2019-02-02
Last edit: SalviaSage 2019-02-02
Hi Zufu Liu.
I just tried your notepad2, and the block caret mode can now be enabled in your Notepad2 editor for either both modes, or the INS mode.
But I noticed that it can not be enabled for the OVR mode, which is of course, the only mode I am interested in. Block caret for the OVR mode.
So, is it the same also in SciTE now? If so, can you make sure that the option for OVR is in?
And how do I test this in SciTE? Have you tested it? I know we can't test it until it is rebuild, so perhaps you can send me a copy of it so I can try here or give instructions on building SciTE from scratch.
I am not a good programmer, but I can follow instructions on how to build it etc. I really want to see this change. And, contact me with PM if interested in chat.
thx, see you.
This will need revert the commit and implement the second.
I found testing and validating caret style is hard with bit fields than with separate caret style for INS mode and OVR mode (first incomplete patch, https://sourceforge.net/p/scintilla/feature-requests/1217/#b799).
Last edit: Zufu Liu 2019-02-03
Okay, so... still no block carets for the OVR mode. :'(
Patch for the second.