macvim-dev / macvim-dev/macvim
Bad interaction between guioptions=! and TerminalOpen
Nobody has claimed this yet.
- Dominant language
- Vim Script
- Stars
- 7.9k
- Forks
- 691
- PR merge metrics
- No merged PRs in 30d
Description
When external commands are executed in a terminal window and a TerminalOpen autocommand is defined, the command may affect the current window.
To Reproduce
- Run
mvim -N -i NONE -u vimrcwherevimrchas the following content:
set number
autocmd TerminalOpen * set nonumber
set guioptions=!
- Type
:!ls(or any other:!command) - You should see the line numbers have disappeared from the current window.
I am expecting that the external command is executed in a different window, hence options set in the terminal window shouldn't affect the current window, as is the case if you remove ! from guioptions.
- Vim 8.1.950
- OS: macOS 10.14
- Terminal: GUI
Contributor guide
First steps
- Read the whole issue, then the project's contributing guide.
- Comment on the issue to say you are picking it up — it saves two people doing the same work.
- Fork the repository and make your change on a branch.
- Open a pull request that references the issue number.
Research direction
Reproduce the issue with the provided vimrc and :!ls, then trace how guioptions=! creates or uses the terminal window and how the TerminalOpen autocommand is applied. Done means the autocommand changes only the terminal window, leaving the current window's line numbers enabled; verify both guioptions=! and the control case without !.
Written by the indexing model from the issue text.
Assessment
- Tech stack
- vim
- Domain
- desktop-dev
- Issue type
- Bug
- Difficulty
- 4/5
- Estimated time
- 3-5 days
- Activity status
- Stale
- Clarity
- Mostly clear
- Newbie friendliness
- 35/100