microsoft / terminal

The new Windows Terminal and the original Windows console host, all in the same place!
MIT License
95k stars 8.22k forks source link

Implement more modern word-wise cursor navigations #15787

Open lhecker opened 1 year ago

lhecker commented 1 year ago

Description of the new feature/enhancement

Conhost and Windows Terminal currently use the classic Windows algorithm, which is also used by Notepad and Visual Studio. Given 3 classes of characters - whitespace, delimiters and regular text - it works something like this:

In comparison Visual Studio Code's navigation works like this:

Due to this symmetry navigating forward/backward will produce consistent and identical results. It'll feel more "intuitive" to new users.

Risk

People can be very picky about changes to our word selection algorithm. Double-clicking words needs to behave similar/identical to before. Cursor navigation needs to be at least so close that no one will feel bothered by it. There should be an opt-out if not at least via a registry key, just in case things go bad.

chrisant996 commented 1 year ago

@lhecker This is referring only to processed input mode in ReadConsole(), right?

DHowett commented 1 year ago

Yup!

carlos-zamora commented 1 week ago

Screen readers also use the other kind of word navigation. So, when a user is navigating the buffer, it also feels really different and confusing.