notepad-plus-plus / notepad-plus-plus/notepad-plus-plus

Alt+Tab to Notepad++ sometimes the cursor/inputpoint is nowhere

Open
#9,310 8 comments 0 reactions 0 assignees View on GitHub

Nobody has claimed this yet.

Dominant language
C++
Stars
29.4k
Forks
5.4k
PR merge metrics
No merged PRs in 30d

Description

Description of the Issue

Starting .. recently? 7.9.1 update? Apologies, I don't know exactly, the following:
(Windows 10 20H2, 64-bit) Alt+Tab into Notepad++, the cursor/input point will be 'nowhere'.
Historically - and still today mostly - upon Alt+Tabbing into Notepad++ the cursor/input point will be wherever it most recently was in whatever buffer happens to be the current buffer.
However, for some weeks now, on multiple computers, upon Alt+Tabbing into Notepad++, occasionally, the cursor/input point will be 'nowhere'. That is, no keystroke will work. (I admit, I may not have tried Alt+ commands, but I HAVE hit ESC a couple of times to cancel possible unintended half Alt- keystrokes, and that hasn't worked, so it's not that a menu option has been partly activated). There is no blinking cursor. No menubar item is highlighted the way it would be if the user had simply tapped "Alt" for example.
It requires clicking with the mouse anywhere in Notepad++ to get the keyboard active again.

Steps to Reproduce the Issue
  1. (unreliably) Alt+Tab into Notepad++
  2. Cursor may be 'nowhere'
Expected Behavior

Cursor would always be live, somewhere in the Notepad++ window, with never the need to mouseclick before being able to start typing into the current buffer.

Actual Behavior

Occasionally, unpredictably, the cursor is 'nowhere', and a mouseclick is required.

Debug Information

Notepad++ v7.9.1 (64-bit)
Build time : Nov 2 2020 - 01:07:46
Path : C:\Program Files\Notepad++\notepad++.exe
Admin mode : OFF
Local Conf mode : OFF
OS Name : Windows 10 Pro (64-bit)
OS Version : 2009
OS Build : 19042.685
Current ANSI codepage : 1252
Plugins : none

Hm. MAYBE it might occur after a buffer has updated because Notepad++ noticed that the underlying file had changed. This happened, once, as I was Alt+Tabbing quite a lot just to see if I could reproduce the problem, and in fact in a couple of dozen Alt+Tabs in and out of Notepad++ it did occur twice. I noticed in that particular case - Alt+Tab in, Notepad++ notices that an underlying file had changed and asks me if I want to update; I click yes and the cursor is nowhere until I Alt+Tab out and back in again. HOWEVER this is NOT the usual case - usually when I've encountered this issue in recent weeks, I did NOT also see a do-you-want-to-update prompt, the underlying file had not changed. (I do not have the option set to automatically reload buffers when underlying files change). I've continued lots of Alt+Tabbing and cannot reproduce the issue again just at the moment.

Contributor guide

Open the contributing guide

First steps

  1. Read the whole issue, then the project's contributing guide.
  2. Comment on the issue to say you are picking it up — it saves two people doing the same work.
  3. Fork the repository and make your change on a branch.
  4. Open a pull request that references the issue number.

Research direction

Start by reproducing the intermittent Alt+Tab focus loss on Windows 10 with Notepad++ v7.9.1, using the reported steps and checking whether an external-file update prompt is involved. Trace the window focus and cursor behavior around Alt+Tab and buffer updates; done means the cursor reliably remains active or the issue is otherwise reproducibly resolved.

Written by the indexing model from the issue text.

Assessment

Tech stack
cpp
Domain
desktop
Issue type
Bug
Difficulty
4/5
Estimated time
3-5 days
Activity status
Stale
Clarity
Needs clarification
Newbie friendliness
25/100

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.