#1643 SciTE 3.5 blinking cursor randomly disappears! (Win32)


Too many times, randomly, the cursor becomes invisible (stops blinking) and prevents the user to see the current insertion point.

This odd behavior occurs (at a sudden time) both when a file is just opened, or pointing somewhere with the mouse or moving the cursor with crsr keys.

Moving the (invisible) cursor, however, makes it sometimes re-appear and blink; moving it again, it suddenly disappears another time. And so on.

Obviously, it isn't matter of blinking interval (one can wait for it for minutes and hours, but it won't be visible anymore after it vanishes!).

This bug has been afflicting Windows(*) version of SciTE since some revisions ago, and is still present in the new 3.5.

Please do something, or it will be quite unusable on Windows!

(*) Using x86 Windows 8.1. Don't know with previous Windows editions.


  • Neil Hodgson

    Neil Hodgson - 2014-08-16

    I haven't seen this. If this started with 3.4.0 then it may be due to the change to using Direct2D for drawing. This is controlled with the technology property

    • maxpat78

      maxpat78 - 2014-08-16

      In fact, setting technology=0 immediately makes it work properly again (I tried playing a bit with caret. properties also, but the result was worse).

  • Neil Hodgson

    Neil Hodgson - 2014-08-16
    • labels: --> scintilla, caret
    • status: open --> open-works-for-me
    • assigned_to: Neil Hodgson
  • gappi

    gappi - 2014-08-31

    Same here on Windows 7 x86.
    However it also seems to be hardware related.
    I see this problem here only on VMware virtual machines whereas it seems to work correct on real PCs.

    • maxpat78

      maxpat78 - 2014-09-01

      I've discovered that technology=1 works on the x64 edition of Windows 8.1, instead!

      Perhaps it is really hardware related (afflicted PC is a 7-yeras-old Pavilion dv6205ea) or truly x86 (non WOW64) related.

  • Lupin

    Lupin - 2014-09-05

    Same here (Win7 x64, Scite 3.4.4). Setting technology to 0, the display is correct.

    I found something that may help in fixing the bug though. When changing technology from 0 to 1 and saving the user settings file (which immediately applies the new settings), the blinking caret now shows whatever was on screen on the respective position before hitting Ctrl+S.

    Maybe a screenshot says more than I can describe. I have overlayed the two images of Scite with settings of technology=0 and =1 . This is the only option that was changed. The darker one is what Scite shows with technology=1, the lighther one with technology=0.

    As you can see technology=0 displays the characters wider, but the lines are a little less high (is this effect part of the setting or a bug on its own?). I marked where I had the caret while technology was set to 1. See how part of the background zero is dark? This is what the caret shows. Somehow there's still an image of the display in memory that was there from before switching to technology was set to 1 and the caret gets a part of that.
    It doesn't matter if I switch to another buffer. If you can position the caret in the exact same place in another buffer it will show the same cutout.
    Btw. the caret is still there and blinking, but for those that haven't set caret.line.back it will blink from white to white (this is what the caret shows when technology wasn't changed at runtime but set to 1 from program start).
    Could it be that for some graphics cards (as it seems hardware related) the "background" image (or where ever the caret gets his content from; it isn't a single solid color obviously) has to be initialized/copied/set to black or something like that?

    Last edit: Lupin 2014-09-05
    • Neil Hodgson

      Neil Hodgson - 2014-09-05

      Its possible that the system caret is interfering here. Scintilla creates an invisible system caret so that screen reader software can determine where the caret is. The system caret created by Scintilla should be completely transparent but its possible that it has some effect in Direct2D mode.

      If you can change the source code and rebuild, try changing the height of the system caret (line 5 in ScintillaWin::CreateSystemCaret in win32\ScintillaWin.cxx) to 1 so the system caret is much shorter and see if that changes the area affected.

      If it is the system caret then there could be a setting to turn the system caret off.

      The change in appearance of the text between the two modes is a normal consequence of using the different graphics library.

      • Lupin

        Lupin - 2014-09-06

        Unfortunately I've nothing set up that lets me rebuild Scite. The only thing I tried was changing the cursor blink rate in windows control panel. But it did not have any effect on the blink rate in Scite (and I didn't expect it to have effect on the visibility).

  • Neil Hodgson

    Neil Hodgson - 2014-09-06

    There is a test build of SciTE with support for a different way of using Direct2D available from scintilla.org. To choose the new mode set technology=2. I am interested in both successes and failures for technology=2 over technology=1.

    Windows executable

    This test build does not contain any changes to the system caret.

    • Lupin

      Lupin - 2014-09-06

      I can't see any difference in behaviour, not between technology=1 and =2 and also not to the my previously used version (3.4.4). It looked the same (I could reproduce the exact same screenshot from above, if I wanted and I made sure I was running the 3.5 version). It also doesn't matter if I restarted with a technology value set to 0, 1 or 2 or changed it at runtime.

  • maxpat78

    maxpat78 - 2014-09-06

    Just tried with technology=2.
    There is no change, except one: today, both with "1" and "2", I can see sometimes a shorter, brighter fixed cursor.

  • maxpat78

    maxpat78 - 2014-10-02

    Neither 3.5.1 fixed it (and probably wasn't planned to do so).

    • Neil Hodgson

      Neil Hodgson - 2014-10-02

      3.5.1 published the technology=2 addition so it can be experimented with more widely. There is ongoing work on Direct2D.

  • Jeffrey Ren

    Jeffrey Ren - 2014-10-07

    I have met the same invisible caret issue under win 8.1 x64 with SciTe 3.50 and 3.51.
    technology=1 or 2 cannot work.
    techonology=0 will work.

  • mberchtold

    mberchtold - 2014-11-08

    The correct way is not to display the system caret (ShowCaret) when D2D is enabled. Please see the attached patch. The caret position is still set so there shouldn't be a problem with screen readers.

    Neil: You can reproduce the problem by running a guest (Windows 8.1, 10) in VMWare and with 200% DPI enabled.

  • Neil Hodgson

    Neil Hodgson - 2014-11-13
    • labels: scintilla, caret --> scintilla, caret, win32
    • status: open-works-for-me --> open-fixed
  • Neil Hodgson

    Neil Hodgson - 2014-11-13

    Committed similar change as [d23d85]. Only calls ShowCaret for SC_TECHNOLOGY_DEFAULT as it is likely that there will be more Direct2D modes in the future.



    Commit: [d23d85]

  • Neil Hodgson

    Neil Hodgson - 2014-12-03
    • status: open-fixed --> closed-fixed
  • maxpat78

    maxpat78 - 2015-04-05

    I forgot the technology=0 in sciteuser.properties ... I've just commented it out and, again, the caret problem (not the caret itself... :( ) reappears! (SciTE 3.5.4 in Wind 8.1 x86 with nVidia Go7400).

    • Neil Hodgson

      Neil Hodgson - 2015-04-08

      There is yet another option from 3.5.2: technology=3.

      • maxpat78

        maxpat78 - 2015-04-08

        Ok, that works fine, thanks!


Log in to post a comment.