[scintilla:feature-requests] #1561 Map invalid cursor to blank cursor.

0 views
Skip to first unread message

johnsonj

unread,
May 23, 2025, 11:00:59 PMMay 23
to scintill...@googlegroups.com

[feature-requests:#1561] Map invalid cursor to blank cursor.

Status: open
Group: Initial
Labels: scintilla mouse cursor hide
Created: Sat May 24, 2025 03:00 AM UTC by johnsonj
Last Updated: Sat May 24, 2025 03:00 AM UTC
Owner: johnsonj
Attachments:

Window::Cursor:invalid is visualized to blank cursor.
patch attached:


Sent from sourceforge.net because scintill...@googlegroups.com is subscribed to https://sourceforge.net/p/scintilla/feature-requests/

To unsubscribe from further messages, a project admin can change settings at https://sourceforge.net/p/scintilla/admin/feature-requests/options. Or, if this is a mailing list, you can unsubscribe from the mailing list.

Neil Hodgson

unread,
May 24, 2025, 8:17:04 PMMay 24
to scintill...@googlegroups.com

Why?

johnsonj

unread,
May 24, 2025, 11:51:21 PMMay 24
to scintill...@googlegroups.com

I'd like to implement noCursorTyping for Win, Gtk and Qt.
I find it is simple to implement the feature in Editor.cxx.

Attachments:


[feature-requests:#1561] Map invalid cursor to blank cursor.

Status: open
Group: Initial
Labels: scintilla mouse cursor hide
Created: Sat May 24, 2025 03:00 AM UTC by johnsonj

Last Updated: Sun May 25, 2025 12:16 AM UTC
Owner: johnsonj
Attachments:

Neil Hodgson

unread,
May 25, 2025, 6:12:12 PMMay 25
to scintill...@googlegroups.com

There's quite a bit more code required to implement cursor hiding, including setting discovery as well as the additions inside Editor.


[feature-requests:#1561] Map invalid cursor to blank cursor.

Status: open
Group: Initial
Labels: scintilla mouse cursor hide
Created: Sat May 24, 2025 03:00 AM UTC by johnsonj

Last Updated: Sun May 25, 2025 03:50 AM UTC
Owner: johnsonj
Attachments:

johnsonj

unread,
May 30, 2025, 11:10:17 AMMay 30
to scintill...@googlegroups.com

I have tried noCursurTyping feature of Win32 to be moved into Editor for supporting all platforms.
macOS gives no blank cursor.
This diff uses setHiddenUntilMouseMoves instead of custom blank cursor for macOS style
But I saw custom blank cursor with transparent image works perfect either.

Attachments:


[feature-requests:#1561] Map invalid cursor to blank cursor.

Status: open
Group: Initial
Labels: scintilla mouse cursor hide
Created: Sat May 24, 2025 03:00 AM UTC by johnsonj

Last Updated: Sun May 25, 2025 10:12 PM UTC
Owner: johnsonj
Attachments:

Neil Hodgson

unread,
May 30, 2025, 9:44:07 PMMay 30
to scintill...@googlegroups.com

This doesn't unhide the cursor in as many circumstances as before since it requires that the mouse position really moved and Windows sends extra WM_MOUSEMOVE messages in some situations. For example, use Ctrl+Tab to switch between documents and SciTE would previously reshow the cursor. With the patch, it doesn't.

https://devblogs.microsoft.com/oldnewthing/20031001-00/?p=42343

There's not much reason to protect the reset of cursorIsHidden with if (typingWithoutCursor) and it more likely to leave the cursor hidden when its not required.


[feature-requests:#1561] Map invalid cursor to blank cursor.

Status: open
Group: Initial
Labels: scintilla mouse cursor hide
Created: Sat May 24, 2025 03:00 AM UTC by johnsonj

Last Updated: Fri May 30, 2025 03:10 PM UTC
Owner: johnsonj
Attachments:

johnsonj

unread,
Jun 1, 2025, 9:52:49 AMJun 1
to scintill...@googlegroups.com

it works well on all platforms.
naming refined.

Attachments:


[feature-requests:#1561] Map invalid cursor to blank cursor.

Status: open
Group: Initial
Labels: scintilla mouse cursor hide
Created: Sat May 24, 2025 03:00 AM UTC by johnsonj

Last Updated: Sat May 31, 2025 01:44 AM UTC
Owner: johnsonj
Attachments:

Neil Hodgson

unread,
Jun 1, 2025, 6:12:42 PMJun 1
to scintill...@googlegroups.com

For example, use Ctrl+Tab to switch between documents and SciTE would previously reshow the cursor. With the patch, it doesn't.

It still doesn't. In case I wasn't clear: the cursor should show when the document is switched. Hide-pointer-while-typing is a light, temporary convenience mode that should be abandoned whenever the use stops typing by performing a larger scope command.

hideCursor0601.diff made the opposite to the wanted change. For Win32, it needs to set cursorIsVisible = true on every WM_MOUSEMOVE, even for the extra messages that did not really move the mouse since they indicate a major change to the window.


[feature-requests:#1561] Map invalid cursor to blank cursor.

Status: open
Group: Initial
Labels: scintilla mouse cursor hide
Created: Sat May 24, 2025 03:00 AM UTC by johnsonj

Last Updated: Sun Jun 01, 2025 01:52 PM UTC
Owner: johnsonj
Attachments:

johnsonj

unread,
Jun 3, 2025, 8:26:03 AMJun 3
to scintill...@googlegroups.com

Semantics changed: cursorIsHidden -> cursorIsVisible -> cursorIsIn
Win32 behaves as your instruction for ctrl+tab, ctrl+N and so forth.
Gtk does keep its cursor state as is.
I am not sure Qt and macOS since I have no tab-featured test application.
But I guess they also behaves as Gtk.

Attachments:


[feature-requests:#1561] Map invalid cursor to blank cursor.

Status: open
Group: Initial
Labels: scintilla mouse cursor hide
Created: Sat May 24, 2025 03:00 AM UTC by johnsonj

Last Updated: Sun Jun 01, 2025 10:12 PM UTC
Owner: johnsonj
Attachments:

Neil Hodgson

unread,
Jun 11, 2025, 7:55:58 PMJun 11
to scintill...@googlegroups.com

Semantics changed: cursorIsHidden -> cursorIsVisible -> cursorIsIn

This change doesn't make sense to me: in what?

Win32 behaves as your instruction for ctrl+tab, ctrl+N and so forth.

It doesn't work for me in SciTE:

action cursor
start visible
type 'a' invisible
Ctrl+Tab invisible

typingWithoutCursor remains false forever except on Win32. Therefore it has no effect and is useless on other platforms. There has to be enabling code that can set it to true.


[feature-requests:#1561] Map invalid cursor to blank cursor.

Status: open
Group: Initial
Labels: scintilla mouse cursor hide
Created: Sat May 24, 2025 03:00 AM UTC by johnsonj

Last Updated: Tue Jun 03, 2025 12:26 PM UTC
Owner: johnsonj
Attachments:

johnsonj

unread,
Jun 12, 2025, 5:47:14 AMJun 12
to scintill...@googlegroups.com

I realize hidden cursor does not depend on visibility.
It depends on character added and whether in or out of edit pane.
(it triggers when character added and only if within edit pane.)

My plan is moving win32 code to Editor, so that make it work for all platforms.
I'd like to expose typingWithoutCursor to user option.
but I did not work on this yet.

Respond spurious event of mouse moving on win32
Ctrl+N, Ctrl+Tab etc revives cursor to be normal.
https://youtu.be/4itLcZUkN9o

Hide cursor while typing for scintilla on macOS
implemented with 16x16 transeparent PNG
https://youtu.be/dlh7dGbdfRo


[feature-requests:#1561] Map invalid cursor to blank cursor.

Status: open
Group: Initial
Labels: scintilla mouse cursor hide
Created: Sat May 24, 2025 03:00 AM UTC by johnsonj

Last Updated: Wed Jun 11, 2025 11:55 PM UTC
Owner: johnsonj
Attachments:

Neil Hodgson

unread,
Jun 12, 2025, 6:53:37 PMJun 12
to scintill...@googlegroups.com

Sometimes it works but not other times.
https://www.youtube.com/watch?v=DnWpkmVeRpk


[feature-requests:#1561] Map invalid cursor to blank cursor.

Status: open
Group: Initial
Labels: scintilla mouse cursor hide
Created: Sat May 24, 2025 03:00 AM UTC by johnsonj

Last Updated: Thu Jun 12, 2025 09:47 AM UTC
Owner: johnsonj
Attachments:

johnsonj

unread,
Jun 16, 2025, 7:58:13 AMJun 16
to scintill...@googlegroups.com

Avoding spurious mouse move event on win32, I bind "cursorIsVisible" with keyboard modifiers. To my surprise, GTK can show cursor between tabs.
but I gave up mouse leave event, which is too elusive to catch.

Hide cursor while typing for scintilla on GTK
https://youtu.be/yQl-mf3XC9w

Attachments:


[feature-requests:#1561] Map invalid cursor to blank cursor.

Status: open
Group: Initial
Labels: scintilla mouse cursor hide
Created: Sat May 24, 2025 03:00 AM UTC by johnsonj

Last Updated: Thu Jun 12, 2025 10:53 PM UTC
Owner: johnsonj
Attachments:

Neil Hodgson

unread,
Jun 17, 2025, 9:29:21 PMJun 17
to scintill...@googlegroups.com

That is flipping cursorIsVisible on and off with WM_KEYDOWN then WM_CHAR for typing. Just holding down Shift prior to typing a capital letter sets cursorIsVisible. This is more difficult to understand than a mode that lasts from the user starting typing until moving the mouse or performing a command. It could result in spurious showing of the cursor in unexpected situations since cursorIsVisible may be true when WM_SETCURSOR is received.

It might be better to set cursorIsVisible in Editor::SetDocPointer as that occurs for some of the most important commands. There may be other circumstances that need setting cursorIsVisible.

This feature still needs to define an API or access to system settings on non-Win32 platforms before there is a benefit to adding it.


[feature-requests:#1561] Map invalid cursor to blank cursor.

Status: open
Group: Initial
Labels: scintilla mouse cursor hide
Created: Sat May 24, 2025 03:00 AM UTC by johnsonj

Last Updated: Mon Jun 16, 2025 11:58 AM UTC
Owner: johnsonj
Attachments:

johnsonj

unread,
Jun 21, 2025, 6:17:38 AMJun 21
to scintill...@googlegroups.com

I managed to build scite working.
+ Set or Get whether hiding mouse cursor or not while typing text.
+ Blank cursor is set (hidden) when any character is typed in.
+ Either mouse moving or buffer switching restores cursor to be normal (shown).

Attachments:


[feature-requests:#1561] Map invalid cursor to blank cursor.

Status: open
Group: Initial
Labels: scintilla mouse cursor hide
Created: Sat May 24, 2025 03:00 AM UTC by johnsonj

Last Updated: Wed Jun 18, 2025 01:29 AM UTC
Owner: johnsonj
Attachments:

johnsonj

unread,
Jun 21, 2025, 6:20:24 AMJun 21
to scintill...@googlegroups.com

also needed!

Attachments:


[feature-requests:#1561] Map invalid cursor to blank cursor.

Status: open
Group: Initial
Labels: scintilla mouse cursor hide
Created: Sat May 24, 2025 03:00 AM UTC by johnsonj

Last Updated: Sat Jun 21, 2025 10:17 AM UTC
Owner: johnsonj
Attachments:

Neil Hodgson

unread,
Jun 22, 2025, 9:40:37 PMJun 22
to scintill...@googlegroups.com

With this change, typingWithoutCursor will revert to the system setting every time WM_SETTINGCHANGE is processed which may be for a wide range of conditions that occur during a run. This makes SCI_SETTYPINGWITHOUTCURSOR unreliable on Windows.

There needs to be a clear plan on how to decide which source is authoritative: SCI_SETTYPINGWITHOUTCURSOR or WM_SETTINGCHANGE.SPI_GETMOUSEVANISH.


[feature-requests:#1561] Map invalid cursor to blank cursor.

Status: open
Group: Initial
Labels: scintilla mouse cursor hide
Created: Sat May 24, 2025 03:00 AM UTC by johnsonj

Last Updated: Sat Jun 21, 2025 10:20 AM UTC
Owner: johnsonj
Attachments:

johnsonj

unread,
Jun 23, 2025, 10:46:02 AMJun 23
to scintill...@googlegroups.com

I prefer SCI_SETTYPINGWITHOUTCURSOR.

Attachments:


[feature-requests:#1561] Map invalid cursor to blank cursor.

Status: open
Group: Initial
Labels: scintilla mouse cursor hide
Created: Sat May 24, 2025 03:00 AM UTC by johnsonj

Last Updated: Mon Jun 23, 2025 01:40 AM UTC
Owner: johnsonj
Attachments:

johnsonj

unread,
Jun 23, 2025, 10:47:20 AMJun 23
to scintill...@googlegroups.com

for scite

Attachments:


[feature-requests:#1561] Map invalid cursor to blank cursor.

Status: open
Group: Initial
Labels: scintilla mouse cursor hide
Created: Sat May 24, 2025 03:00 AM UTC by johnsonj

Last Updated: Mon Jun 23, 2025 02:45 PM UTC
Owner: johnsonj
Attachments:

Neil Hodgson

unread,
Jun 23, 2025, 5:44:57 PMJun 23
to scintill...@googlegroups.com

That is removing functionality that is wanted by other users.


[feature-requests:#1561] Map invalid cursor to blank cursor.

Status: open
Group: Initial
Labels: scintilla mouse cursor hide
Created: Sat May 24, 2025 03:00 AM UTC by johnsonj

Last Updated: Mon Jun 23, 2025 02:47 PM UTC
Owner: johnsonj
Attachments:

johnsonj

unread,
Jun 24, 2025, 7:48:24 AMJun 24
to scintill...@googlegroups.com

SPI_GETMOUSEVANISH reflected!

Attachments:


[feature-requests:#1561] Map invalid cursor to blank cursor.

Status: open
Group: Initial
Labels: scintilla mouse cursor hide
Created: Sat May 24, 2025 03:00 AM UTC by johnsonj

Last Updated: Mon Jun 23, 2025 09:44 PM UTC
Owner: johnsonj
Attachments:

johnsonj

unread,
Jun 24, 2025, 7:49:37 AMJun 24
to scintill...@googlegroups.com

for scintilla

Attachments:


[feature-requests:#1561] Map invalid cursor to blank cursor.

Status: open
Group: Initial
Labels: scintilla mouse cursor hide
Created: Sat May 24, 2025 03:00 AM UTC by johnsonj

Last Updated: Tue Jun 24, 2025 11:48 AM UTC
Owner: johnsonj
Attachments:

Neil Hodgson

unread,
Jun 25, 2025, 6:31:56 PMJun 25
to scintill...@googlegroups.com

Current behaviour should be preserved with cursor visible when typing as the default.
Even when I go to the Windows settings and turn off "Hide pointer while typing", it still disappears. There will be upset users if this implementation is committed.


[feature-requests:#1561] Map invalid cursor to blank cursor.

Status: open
Group: Initial
Labels: scintilla mouse cursor hide
Created: Sat May 24, 2025 03:00 AM UTC by johnsonj

Last Updated: Tue Jun 24, 2025 11:49 AM UTC
Owner: johnsonj
Attachments:

johnsonj

unread,
Jun 26, 2025, 7:44:05 AMJun 26
to scintill...@googlegroups.com

it defaults false

Attachments:


[feature-requests:#1561] Map invalid cursor to blank cursor.

Status: open
Group: Initial
Labels: scintilla mouse cursor hide
Created: Sat May 24, 2025 03:00 AM UTC by johnsonj

Last Updated: Wed Jun 25, 2025 10:31 PM UTC
Owner: johnsonj
Attachments:

johnsonj

unread,
Jun 26, 2025, 7:45:04 AMJun 26
to scintill...@googlegroups.com

for scite

Attachments:


[feature-requests:#1561] Map invalid cursor to blank cursor.

Status: open
Group: Initial
Labels: scintilla mouse cursor hide
Created: Sat May 24, 2025 03:00 AM UTC by johnsonj

Last Updated: Thu Jun 26, 2025 11:44 AM UTC
Owner: johnsonj
Attachments:

Neil Hodgson

unread,
Jul 2, 2025, 6:17:44 PMJul 2
to scintill...@googlegroups.com

To avoid changing behaviour unexpectedly, SciTE should also default to no hiding or to hiding only on Win32.

Reply all
Reply to author
Forward
0 new messages