Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Cursor shape does not reset when :term is executed with ++close #5461

Closed
gfiorav opened this issue Jan 8, 2020 · 4 comments
Closed

Cursor shape does not reset when :term is executed with ++close #5461

gfiorav opened this issue Jan 8, 2020 · 4 comments

Comments

@gfiorav
Copy link

gfiorav commented Jan 8, 2020

It might be related to #3692.

Describe the bug
Whenever I run :term ++close git push, the cursor shape resets to my terminal defaults (block). It doesn't matter what command you run after ++close. Note that this doesn't happen when you open a terminal with :term and close it manually.

To Reproduce
Detailed steps to reproduce the behavior:

  1. Run vim --clean (or gvim --clean)
  2. Make sure your cursor shape is something other than the default cursor shape of your terminal.
  3. Execute :term ++close ls
  4. The cursor shape has been changed to the default (block in my case) instead of resetting to underline.

Expected behavior
The cursor shape should have returned to whatever was configured.

Environment (please complete the following information):

  • Vim version
VIM - Vi IMproved 8.2 (2019 Dec 12, compiled Jan  7 2020 17:59:19)
Included patches: 1-100
Compiled by me
Huge version without GUI.  Features included (+) or not (-):
+acl               -farsi             -mouse_sysmouse    -tag_old_static
+arabic            +file_in_path      +mouse_urxvt       -tag_any_white
+autocmd           +find_in_path      +mouse_xterm       -tcl
+autochdir         +float             +multi_byte        +termguicolors
-autoservername    +folding           +multi_lang        +terminal
-balloon_eval      -footer            -mzscheme          +terminfo
+balloon_eval_term +fork()            +netbeans_intg     +termresponse
-browse            -gettext           +num64             +textobjects
++builtin_terms    -hangul_input      +packages          +textprop
+byte_offset       +iconv             +path_extra        +timers
+channel           +insert_expand     -perl              +title
+cindent           +job               +persistent_undo   -toolbar
+clientserver      +jumplist          +popupwin          +user_commands
+clipboard         +keymap            +postscript        +vartabs
+cmdline_compl     +lambda            +printer           +vertsplit
+cmdline_hist      +langmap           +profile           +virtualedit
+cmdline_info      +libcall           -python            +visual
+comments          +linebreak         -python3           +visualextra
+conceal           +lispindent        +quickfix          +viminfo
+cryptv            +listcmds          +reltime           +vreplace
+cscope            +localmap          +rightleft         +wildignore
+cursorbind        -lua               -ruby              +wildmenu
+cursorshape       +menu              +scrollbind        +windows
+dialog_con        +mksession         +signs             +writebackup
+diff              +modify_fname      +smartindent       +X11
+digraphs          +mouse             -sound             +xfontset
-dnd               -mouseshape        +spell             -xim
-ebcdic            +mouse_dec         +startuptime       +xpm
+emacs_tags        -mouse_gpm         +statusline        +xsmp_interact
+eval              -mouse_jsbterm     -sun_workshop      +xterm_clipboard
+ex_extra          +mouse_netterm     +syntax            -xterm_save
+extra_search      +mouse_sgr         +tag_binary        
   system vimrc file: "$VIM/vimrc"
     user vimrc file: "$HOME/.vimrc"
 2nd user vimrc file: "~/.vim/vimrc"
      user exrc file: "$HOME/.exrc"
       defaults file: "$VIMRUNTIME/defaults.vim"
  fall-back for $VIM: "/usr/local/share/vim"
Compilation: gcc -c -I. -Iproto -DHAVE_CONFIG_H     -O2 -fno-strength-reduce -Wall -U_FO
RTIFY_SOURCE -D_FORTIFY_SOURCE=1       
Linking: gcc   -L/usr/local/lib -Wl,--as-needed -o vim    -lSM -lICE -lXpm -lXt -lX11 -l
Xdmcp -lSM -lICE  -lm -ltinfo -lnsl  -ldl           
  • OS: Ubuntu 18.04, Debian stretch
  • Terminal: Windows Terminal (Preview), Windows Console Host

Additional context
This has been happening for some versions now, but I thought it was my setup. I just verified it happens under vim --clean, hence me opening this ticket.

@brammool
Copy link
Contributor

brammool commented Jan 8, 2020

What is the output of ":echo v:termstyleresp"? If it is empty, it means that Vim cannot know the original shape.

@gfiorav
Copy link
Author

gfiorav commented Jan 8, 2020

It's empty (at least vim doesn't seem to do anything when I input that command). Why does it work as expected if I run :term and then manually close it?

Thanks for taking the time to review this and answer, I really love vim.

@gfiorav
Copy link
Author

gfiorav commented Jan 16, 2020

How can I set v:termstyleresp? AFAIK that's read-only. Reading vim-help on it, it reads &t_RS, so I've added this to my .vimrc:

let &t_RS = "\e[5 q"

Still, echo v:termstyleresp returns empty.

I'm still puzzled by the fact that :term without providing ++close will work just fine cursor-wise.

@gfiorav
Copy link
Author

gfiorav commented Jan 27, 2023

I can't repro anymore. Closing. Thanks for your assistance @brammool !

@gfiorav gfiorav closed this as completed Jan 27, 2023
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants