Off by ONE again. #23676

Closed
opened 2026-01-31 08:48:57 +00:00 by claunia · 11 comments
Owner

Originally created by @0wwafa on GitHub (Oct 9, 2025).

In version 1.22.12.111 none of these bugs were present.
The you changed something and this happened: https://github.com/microsoft/terminal/issues/19294

Now even the latest version has that corrected (in 1.24.2372.0 for example) BUT there is still a consequence:
clearly the "fix" was probably a work-around made in the wrong place (but that's a speculation).

As a result, double clicking on a word, one more character is selected and pasted..

Image
Originally created by @0wwafa on GitHub (Oct 9, 2025). In version 1.22.12.111 none of these bugs were present. The you changed something and this happened: https://github.com/microsoft/terminal/issues/19294 Now even the latest version has that corrected (in 1.24.2372.0 for example) BUT there is still a consequence: clearly the "fix" was probably a work-around made in the wrong place (but that's a speculation). As a result, double clicking on a word, one more character is selected and pasted.. <img width="1084" height="233" alt="Image" src="https://github.com/user-attachments/assets/7669ed2d-3186-43f7-ab1c-49c4600dbe73" />
claunia added the Resolution-By-DesignNeeds-TriageNeeds-Tag-Fix labels 2026-01-31 08:48:57 +00:00
Author
Owner

@0wwafa commented on GitHub (Oct 9, 2025):

hmm I'm confused... I checked even the original conhost.exe and it does exactly the same thing. weirdly enough, if I select "Corporation." it selects until the dot.

@0wwafa commented on GitHub (Oct 9, 2025): hmm I'm confused... I checked even the original conhost.exe and it does exactly the same thing. weirdly enough, if I select "Corporation." it selects until the dot.
Author
Owner

@0wwafa commented on GitHub (Oct 9, 2025):

Image Image Image Image
@0wwafa commented on GitHub (Oct 9, 2025): <img width="718" height="173" alt="Image" src="https://github.com/user-attachments/assets/3969fa09-f90c-42a7-a28a-96ffcb15a648" /> <img width="718" height="173" alt="Image" src="https://github.com/user-attachments/assets/0784a85e-c156-48b3-9353-d5063d489072" /> <img width="718" height="173" alt="Image" src="https://github.com/user-attachments/assets/828fd71b-f103-41a6-b6e6-094a2816b1a3" /> <img width="718" height="173" alt="Image" src="https://github.com/user-attachments/assets/67bbf5e0-50d0-499d-8366-895ff1a7d05e" />
Author
Owner

@0wwafa commented on GitHub (Oct 9, 2025):

By the way, openconsole in 1.23.126 is still affected by the original off by one in copy/paste.

Example manually selecting the word Microsoft

Image
@0wwafa commented on GitHub (Oct 9, 2025): By the way, openconsole in 1.23.126 is still affected by the original off by one in copy/paste. Example manually selecting the word **Microsoft** <img width="651" height="209" alt="Image" src="https://github.com/user-attachments/assets/e6236e3c-02d7-4050-9a12-9d649af16c11" />
Author
Owner

@0wwafa commented on GitHub (Oct 9, 2025):

And is not present in v1.24.2682.0

Example, double clicking on the word Microsoft (also selecting manually works)

Image
@0wwafa commented on GitHub (Oct 9, 2025): And is **not** present in [v1.24.2682.0](https://github.com/microsoft/terminal/releases/tag/v1.24.2682.0) Example, double clicking on the word **Microsoft** (also selecting manually works) <img width="694" height="204" alt="Image" src="https://github.com/user-attachments/assets/e0d97455-9ad5-4980-a323-f159d82f6911" />
Author
Owner

@DHowett commented on GitHub (Oct 9, 2025):

This is a good opportunity for me to bust out my collection of Old Conhosts.

It looks like this behavior is conserved all the way back to RS2 (10.0.15063, from 2017), which is the earliest console host I can test:

Image Image

it still runs on Windows 11, because we haven't changed the kernel driver interface or any user32 exports.

Now... I got curious and checked out what Windows NT 3.51 does. It doesn't support quick edit mode, so you have to switch into Mark mode before selecting. It looks like it also doesn't support word selection, so it is not good for a differential diagnostic.

Anyway. The last time we intentionally changed word selection in the console, we got a bunch of angry internal bugs filed on us. 🙂

While it might be surprising, this one is at least by design.


clearly the "fix" was probably a work-around made in the wrong place (but that's a speculation).

(I am trying as hard as I can to not read your bug reports as though you hold great disdain for us. You do not make it very easy.)

@DHowett commented on GitHub (Oct 9, 2025): This is a good opportunity for me to bust out my collection of Old Conhosts. It looks like this behavior is conserved all the way back to RS2 (10.0.15063, from 2017), which is the earliest console host I can test: <img width="811" height="164" alt="Image" src="https://github.com/user-attachments/assets/259bc984-9709-4a44-a1f7-cad18cfa6e0a" /> <img width="515" height="342" alt="Image" src="https://github.com/user-attachments/assets/195f1bad-9d87-4448-aea5-37ab6b79acaa" /> _it still runs on Windows 11, because we haven't changed the kernel driver interface or any user32 exports._ Now... I got curious and checked out what Windows NT 3.51 does. It doesn't support quick edit mode, so you have to switch into Mark mode before selecting. It looks like it also doesn't support word selection, so it is not good for a differential diagnostic. Anyway. The last time we intentionally changed word selection in the console, we got a bunch of angry internal bugs filed on us. 🙂 While it might be surprising, this one is at least by design. --- > clearly the "fix" was probably a work-around made in the wrong place (but that's a speculation). (I am trying as hard as I can to not read your bug reports as though you hold great disdain for us. You do not make it very easy.)
Author
Owner

@0wwafa commented on GitHub (Oct 17, 2025):

By the way, openconsole in 1.23.126 is still affected by the original off by one in copy/paste.

Example manually selecting the word Microsoft

Image

@DHowett how about this one?

And is not present in v1.24.2682.0

Example, double clicking on the word Microsoft (also selecting manually works)

Image
@0wwafa commented on GitHub (Oct 17, 2025): > By the way, openconsole in 1.23.126 is still affected by the original off by one in copy/paste. > > Example manually selecting the word **Microsoft** > > <img alt="Image" width="651" height="209" src="https://private-user-images.githubusercontent.com/170285982/499390233-e6236e3c-02d7-4050-9a12-9d649af16c11.png?jwt=eyJ0eXAiOiJKV1QiLCJhbGciOiJIUzI1NiJ9.eyJpc3MiOiJnaXRodWIuY29tIiwiYXVkIjoicmF3LmdpdGh1YnVzZXJjb250ZW50LmNvbSIsImtleSI6ImtleTUiLCJleHAiOjE3NjA3MDMwNjYsIm5iZiI6MTc2MDcwMjc2NiwicGF0aCI6Ii8xNzAyODU5ODIvNDk5MzkwMjMzLWU2MjM2ZTNjLTAyZDctNDA1MC05YTEyLTlkNjQ5YWYxNmMxMS5wbmc_WC1BbXotQWxnb3JpdGhtPUFXUzQtSE1BQy1TSEEyNTYmWC1BbXotQ3JlZGVudGlhbD1BS0lBVkNPRFlMU0E1M1BRSzRaQSUyRjIwMjUxMDE3JTJGdXMtZWFzdC0xJTJGczMlMkZhd3M0X3JlcXVlc3QmWC1BbXotRGF0ZT0yMDI1MTAxN1QxMjA2MDZaJlgtQW16LUV4cGlyZXM9MzAwJlgtQW16LVNpZ25hdHVyZT1iMGVmOWU2Yjg1MzRhYjY4MzJmZjY5MmUwYjZmNTRjZmRhN2I4NjY1OWM2MWYxNmViOWY0NGE5YjAwNjE3NTA3JlgtQW16LVNpZ25lZEhlYWRlcnM9aG9zdCJ9.XV1Ao7FQko0cjofYRORxE2z1NCGVl4PV0Gq3l6Hl5yk"> @DHowett how about this one? > And is **not** present in [v1.24.2682.0](https://github.com/microsoft/terminal/releases/tag/v1.24.2682.0) > > Example, double clicking on the word **Microsoft** (also selecting manually works) > > <img alt="Image" width="694" height="204" src="https://private-user-images.githubusercontent.com/170285982/499391943-e0d97455-9ad5-4980-a323-f159d82f6911.png?jwt=eyJ0eXAiOiJKV1QiLCJhbGciOiJIUzI1NiJ9.eyJpc3MiOiJnaXRodWIuY29tIiwiYXVkIjoicmF3LmdpdGh1YnVzZXJjb250ZW50LmNvbSIsImtleSI6ImtleTUiLCJleHAiOjE3NjA3MDMwNjYsIm5iZiI6MTc2MDcwMjc2NiwicGF0aCI6Ii8xNzAyODU5ODIvNDk5MzkxOTQzLWUwZDk3NDU1LTlhZDUtNDk4MC1hMzIzLWYxNTlkODJmNjkxMS5wbmc_WC1BbXotQWxnb3JpdGhtPUFXUzQtSE1BQy1TSEEyNTYmWC1BbXotQ3JlZGVudGlhbD1BS0lBVkNPRFlMU0E1M1BRSzRaQSUyRjIwMjUxMDE3JTJGdXMtZWFzdC0xJTJGczMlMkZhd3M0X3JlcXVlc3QmWC1BbXotRGF0ZT0yMDI1MTAxN1QxMjA2MDZaJlgtQW16LUV4cGlyZXM9MzAwJlgtQW16LVNpZ25hdHVyZT01MGM2NWVkMGMwM2I0OWJjMWMzNDVjNzJlN2FhNWZlNWViMDViYjlmODAxNzJmYjczYzNjNmU3YjFiZjE2MTY2JlgtQW16LVNpZ25lZEhlYWRlcnM9aG9zdCJ9.riKtoqlJzE5a1uf7h938pzipkqBDkyT9kkZvT2HdMZc">
Author
Owner

@DHowett commented on GitHub (Oct 17, 2025):

Alas. Since we do not offer OpenConsole as a standalone product warranted for individual use after being extracted from the Windows Terminal distribution archive, I didn't see fit to include that change in any servicing updates.

(Copying some notes over from #19053:

OpenConsole is offered with the Terminal product as the PTY host, and is not intended for external use. Any such use is attempted at your own risk, with no warranty for fitness.

)

@DHowett commented on GitHub (Oct 17, 2025): Alas. Since we do not offer OpenConsole as a standalone product warranted for individual use after being extracted from the Windows Terminal distribution archive, I didn't see fit to include that change in any servicing updates. (Copying some notes over from #19053: > OpenConsole is offered with the Terminal product as the PTY host, and is not intended for external use. Any such use is attempted at your own risk, with no warranty for fitness. )
Author
Owner

@0wwafa commented on GitHub (Dec 4, 2025):

@DHowett I was referring to https://github.com/microsoft/terminal/releases/download/v1.24.2812.0/Microsoft.Windows.Console.ConPTY.1.24.251008002-preview.nupkg

Which is stand-alone.
(and anyway I thought you wanted bug reports, if I am bothering you I won't do it anymore)

Also consider that most bugs in openconsole will affect terminal too because it relies on it.

@0wwafa commented on GitHub (Dec 4, 2025): @DHowett I was referring to https://github.com/microsoft/terminal/releases/download/v1.24.2812.0/Microsoft.Windows.Console.ConPTY.1.24.251008002-preview.nupkg Which is stand-alone. (and anyway I thought you wanted bug reports, if I am bothering you I won't do it anymore) Also consider that most bugs in openconsole will affect terminal too because it relies on it.
Author
Owner

@DHowett commented on GitHub (Dec 4, 2025):

Yes and no. That package is intended to be consumed by applications using the PTY hosting infrastructure. It's only a console host with a UI because technically all versions of the PTY host today are console hosts. This is also the way in which Terminal uses it. None of the user interactivity things (the window, mouse input, text selection, scrolling) inside OpenConsole are shared with Terminal or expected to be used by folks using the ConPTY package.

And I actually do appreciate your bug reports! I just prioritize conhost only bugs in a different way and on a different release cycle than those that impact terminal.

@DHowett commented on GitHub (Dec 4, 2025): Yes and no. That package is intended to be consumed by applications using the PTY hosting infrastructure. It's only a console host with a UI because technically all versions of the PTY host _today_ are console hosts. This is also the way in which Terminal uses it. None of the user interactivity things (the window, mouse input, text selection, scrolling) inside OpenConsole are shared with Terminal or expected to be used by folks using the ConPTY package. And I actually do appreciate your bug reports! I just prioritize _conhost only bugs_ in a different way and on a different release cycle than those that impact terminal.
Author
Owner

@0wwafa commented on GitHub (Dec 17, 2025):

@DHowett
The bug is still present in the latest version.
https://github.com/microsoft/terminal/releases/download/v1.23.13503.0/Microsoft.Windows.Console.ConPTY.1.23.251216003.nupkg

@0wwafa commented on GitHub (Dec 17, 2025): @DHowett The bug is still present in the latest version. https://github.com/microsoft/terminal/releases/download/v1.23.13503.0/Microsoft.Windows.Console.ConPTY.1.23.251216003.nupkg
Author
Owner
@0wwafa commented on GitHub (Dec 18, 2025): The bug **is not** present in this version: https://github.com/microsoft/terminal/releases/download/v1.24.3504.0/Microsoft.Windows.Console.ConPTY.1.24.251216004-preview.nupkg
Sign in to join this conversation.
1 Participants
Notifications
Due Date
No due date set.
Dependencies

No dependencies set.

Reference: starred/terminal#23676