enter_insert_mode / exit_insert_mode not respected (bug?) #11823

Closed
opened 2026-01-31 02:58:26 +00:00 by claunia · 2 comments
Owner

Originally created by @Dweeberly on GitHub (Dec 16, 2020).

Environment

OS Name:                   Microsoft Windows 10 Enterprise
OS Version:                10.0.18363 N/A Build 18363
OS Manufacturer:           Microsoft Corporation
OS Configuration:          Member Workstation
Ubuntu (wsl2): Linux d10c167 4.19.128-microsoft-standard #1 SMP Tue Jun 23 12:58:10 UTC 2020 x86_64 x86_64 x86_64 GNU/Linux
Windows Terminal: 1.4.3243.0

Any other software?

No

Steps to reproduce

I'm not sure if I should call this a bug, a feature request or working as designed. I couldn't find a definitive list of terminal capabilities and the terminfo docs I found were not as clear as I would have liked. In this case it appears that the enter_insert_mode and exit_insert_mode capabilities are not supported. See SO https://superuser.com/questions/1603309/vi-command-line-editing-insert-mode-overwrite/1610427#1610427 for additional detail.

In a Ubuntu (terminfo) environment you can see it with the following commands:

> echo -n "aaa";tput cub1;tput ich1;echo "b"
aaba
> echo -n "aaa";tput cub1;tput smir;echo "b";tput rmir
aab

if smir/rmir were respected I would expect to see both result strings equal to each other.

Expected behavior

I would expect that when the terminal receives the smir/im (enter_insert_mode) sequence that it would insert characters at the current cursor position until a rmir/ei (exit_insert_mode) sequence is received.

Actual behavior

smir/im (enter_insert_mode) appears to be ignored and characters entered begin overwriting at the current cursor position.

Originally created by @Dweeberly on GitHub (Dec 16, 2020). <!-- 🚨🚨🚨🚨🚨🚨🚨🚨🚨🚨 I ACKNOWLEDGE THE FOLLOWING BEFORE PROCEEDING: 1. If I delete this entire template and go my own path, the core team may close my issue without further explanation or engagement. 2. If I list multiple bugs/concerns in this one issue, the core team may close my issue without further explanation or engagement. 3. If I write an issue that has many duplicates, the core team may close my issue without further explanation or engagement (and without necessarily spending time to find the exact duplicate ID number). 4. If I leave the title incomplete when filing the issue, the core team may close my issue without further explanation or engagement. 5. If I file something completely blank in the body, the core team may close my issue without further explanation or engagement. All good? Then proceed! --> <!-- This bug tracker is monitored by Windows Terminal development team and other technical folks. **Important: When reporting BSODs or security issues, DO NOT attach memory dumps, logs, or traces to Github issues**. Instead, send dumps/traces to secure@microsoft.com, referencing this GitHub issue. If this is an application crash, please also provide a Feedback Hub submission link so we can find your diagnostic data on the backend. Use the category "Apps > Windows Terminal (Preview)" and choose "Share My Feedback" after submission to get the link. Please use this form and describe your issue, concisely but precisely, with as much detail as possible. --> # Environment ``` OS Name: Microsoft Windows 10 Enterprise OS Version: 10.0.18363 N/A Build 18363 OS Manufacturer: Microsoft Corporation OS Configuration: Member Workstation Ubuntu (wsl2): Linux d10c167 4.19.128-microsoft-standard #1 SMP Tue Jun 23 12:58:10 UTC 2020 x86_64 x86_64 x86_64 GNU/Linux Windows Terminal: 1.4.3243.0 ``` Any other software? ``` No ``` # Steps to reproduce I'm not sure if I should call this a bug, a feature request or working as designed. I couldn't find a definitive list of terminal capabilities and the terminfo docs I found were not as clear as I would have liked. In this case it appears that the enter_insert_mode and exit_insert_mode capabilities are not supported. See SO https://superuser.com/questions/1603309/vi-command-line-editing-insert-mode-overwrite/1610427#1610427 for additional detail. In a Ubuntu (terminfo) environment you can see it with the following commands: ``` > echo -n "aaa";tput cub1;tput ich1;echo "b" aaba > echo -n "aaa";tput cub1;tput smir;echo "b";tput rmir aab ``` if smir/rmir were respected I would expect to see both result strings equal to each other. <!-- A description of how to trigger this bug. --> # Expected behavior I would expect that when the terminal receives the smir/im (enter_insert_mode) sequence that it would insert characters at the current cursor position until a rmir/ei (exit_insert_mode) sequence is received. <!-- A description of what you're expecting, possibly containing screenshots or reference material. --> # Actual behavior smir/im (enter_insert_mode) appears to be ignored and characters entered begin overwriting at the current cursor position. <!-- What's actually happening? -->
claunia added the Resolution-Duplicate label 2026-01-31 02:58:26 +00:00
Author
Owner

@DHowett commented on GitHub (Dec 16, 2020):

This sounds like a /duplicate of #1947. We're working on it 😄

@DHowett commented on GitHub (Dec 16, 2020): This sounds like a /duplicate of #1947. We're working on it :smile:
Author
Owner

@ghost commented on GitHub (Dec 16, 2020):

Hi! We've identified this issue as a duplicate of another one that already exists on this Issue Tracker. This specific instance is being closed in favor of tracking the concern over on the referenced thread. Thanks for your report!

@ghost commented on GitHub (Dec 16, 2020): Hi! We've identified this issue as a duplicate of another one that already exists on this Issue Tracker. This specific instance is being closed in favor of tracking the concern over on the referenced thread. Thanks for your report!
Sign in to join this conversation.
1 Participants
Notifications
Due Date
No due date set.
Dependencies

No dependencies set.

Reference: starred/terminal#11823