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

vim modify my file automatically in babun of win10 #8458

Open
persuez opened this issue Jun 26, 2021 · 6 comments
Open

vim modify my file automatically in babun of win10 #8458

persuez opened this issue Jun 26, 2021 · 6 comments

Comments

@persuez
Copy link

persuez commented Jun 26, 2021

Describe the bug
vim modify my file automatically in babun of win10
I log in my VPS ubuntu machine with ssh. My host enviroment is win 10, babun. Just give an example.

  1. echo 123 > asd
  2. vim asd

Now, I find the content of asd automatically becomes 122.

cat asd ==> 123

It seems VIM automatically minus 1 of the last integer of my file. Also, my vim is just compiled, and does not have any configure files.

To Reproduce
Detailed steps to reproduce the behavior:

  1. download source code after 8.2.0936(included) version
  2. change dir to vim
  3. ./configure --with-features=huge --enable-multibyte --enable-rubyinterp=yes --enable-python3interp=yes --with-python3-config-dir=$(python3-config --configdir) --enable-perlinterp=yes --enable-luainterp=yes --enable-gui=gtk2 --enable-cscope --prefix=/usr/local
  4. make -j4
  5. sudo make install
  6. just vim asd, I found content of asd becomes 122.

Expected behavior
A clear and concise description of what you expected to happen.

Environment (please complete the following information):

  • win10 babun, only babun will occurs
$ vim --version
VIM - Vi IMproved 8.2 (2019 Dec 12, compiled Jun 26 2021 17:14:28)
Included patches: 1-936
Compiled by ql@VM-0-7-ubuntu
Huge version with GTK2 GUI.  Features included (+) or not (-):
+acl               -farsi             +mouse_sgr         +tag_binary
+arabic            +file_in_path      -mouse_sysmouse    -tag_old_static
+autocmd           +find_in_path      +mouse_urxvt       -tag_any_white
+autochdir         +float             +mouse_xterm       -tcl
-autoservername    +folding           +multi_byte        +termguicolors
+balloon_eval      -footer            +multi_lang        +terminal
+balloon_eval_term +fork()            -mzscheme          +terminfo
+browse            +gettext           +netbeans_intg     +termresponse
++builtin_terms    -hangul_input      +num64             +textobjects
+byte_offset       +iconv             +packages          +textprop
+channel           +insert_expand     +path_extra        +timers
+cindent           +ipv6              +perl              +title
+clientserver      +job               +persistent_undo   +toolbar
+clipboard         +jumplist          +popupwin          +user_commands
+cmdline_compl     +keymap            +postscript        +vartabs
+cmdline_hist      +lambda            +printer           +vertsplit
+cmdline_info      +langmap           +profile           +virtualedit
+comments          +libcall           -python            +visual
+conceal           +linebreak         +python3           +visualextra
+cryptv            +lispindent        +quickfix          +viminfo
+cscope            +listcmds          +reltime           +vreplace
+cursorbind        +localmap          +rightleft         +wildignore
+cursorshape       +lua               +ruby              +wildmenu
+dialog_con_gui    +menu              +scrollbind        +windows
+diff              +mksession         +signs             +writebackup
+digraphs          +modify_fname      +smartindent       +X11
+dnd               +mouse             -sound             -xfontset
-ebcdic            +mouseshape        +spell             +xim
+emacs_tags        +mouse_dec         +startuptime       +xpm
+eval              -mouse_gpm         +statusline        +xsmp_interact
+ex_extra          -mouse_jsbterm     -sun_workshop      +xterm_clipboard
+extra_search      +mouse_netterm     +syntax            -xterm_save
   system vimrc file: "$VIM/vimrc"
     user vimrc file: "$HOME/.vimrc"
 2nd user vimrc file: "~/.vim/vimrc"
      user exrc file: "$HOME/.exrc"
  system gvimrc file: "$VIM/gvimrc"
    user gvimrc file: "$HOME/.gvimrc"
2nd user gvimrc file: "~/.vim/gvimrc"
       defaults file: "$VIMRUNTIME/defaults.vim"
    system menu file: "$VIMRUNTIME/menu.vim"
  fall-back for $VIM: "/usr/local/share/vim"
Compilation: gcc -c -I. -Iproto -DHAVE_CONFIG_H -DFEAT_GUI_GTK  -pthread -I/usr/include/gtk-2.0 -I/usr/lib/x86_64-linux-gnu/gtk-2.0/include -I/usr/include/gio-unix-2.0/ -I/usr/include/cairo -I/usr/include/pango-1.0 -I/usr/include/atk-1.0 -I/usr/include/cairo -I/usr/include/pixman-1 -I/usr/include/gdk-pixbuf-2.0 -I/usr/include/libpng16 -I/usr/include/pango-1.0 -I/usr/include/harfbuzz -I/usr/include/pango-1.0 -I/usr/include/glib-2.0 -I/usr/lib/x86_64-linux-gnu/glib-2.0/include -I/usr/include/freetype2 -I/usr/include/libpng16 -I/usr/include/freetype2 -I/usr/include/libpng16   -g -O2 -U_FORTIFY_SOURCE -D_FORTIFY_SOURCE=1
Linking: gcc   -L. -Wl,-Bsymbolic-functions -Wl,-z,relro -Wl,-z,now -fstack-protector -rdynamic -Wl,-export-dynamic -Wl,-E   -L/usr/local/lib -Wl,--as-needed -o vim   -lgtk-x11-2.0 -lgdk-x11-2.0 -lpangocairo-1.0 -latk-1.0 -lcairo -lgdk_pixbuf-2.0 -lgio-2.0 -lpangoft2-1.0 -lpango-1.0 -lgobject-2.0 -lglib-2.0 -lfontconfig -lfreetype -lSM -lICE -lXpm -lXt -lX11 -lXdmcp -lSM -lICE  -lm -ltinfo   -ldl  -L/usr/lib -llua5.2 -Wl,-E  -fstack-protector-strong -L/usr/local/lib  -L/usr/lib/x86_64-linux-gnu/perl/5.26/CORE -lperl -ldl -lm -lpthread -lcrypt  -L/usr/lib/python3.6/config-3.6m-x86_64-linux-gnu -lpython3.6m -lpthread -ldl -lutil -lm  -lruby-2.5 -lpthread -lgmp -ldl -lcrypt -lm
in vim, :scriptnames
  1: /usr/local/share/vim/vim82/defaults.vim
  2: /usr/local/share/vim/vim82/syntax/syntax.vim
  3: /usr/local/share/vim/vim82/syntax/synload.vim
  4: /usr/local/share/vim/vim82/syntax/syncolor.vim
  5: /usr/local/share/vim/vim82/filetype.vim
  6: /usr/local/share/vim/vim82/ftplugin.vim
  7: /usr/local/share/vim/vim82/indent.vim
  8: /usr/local/share/vim/vim82/plugin/getscriptPlugin.vim
  9: /usr/local/share/vim/vim82/plugin/gzip.vim
 10: /usr/local/share/vim/vim82/plugin/logiPat.vim
 11: /usr/local/share/vim/vim82/plugin/manpager.vim
 12: /usr/local/share/vim/vim82/plugin/matchparen.vim
 13: /usr/local/share/vim/vim82/plugin/netrwPlugin.vim
 14: /usr/local/share/vim/vim82/plugin/rrhelper.vim
 15: /usr/local/share/vim/vim82/plugin/spellfile.vim
 16: /usr/local/share/vim/vim82/plugin/tarPlugin.vim
 17: /usr/local/share/vim/vim82/plugin/tohtml.vim
 18: /usr/local/share/vim/vim82/plugin/vimballPlugin.vim
 19: /usr/local/share/vim/vim82/plugin/zipPlugin.vim
 20: /usr/local/share/vim/vim82/scripts.vim
{ ~ }  » babun --version                                                                                                                        ~
babun version 1.1.0
Created and maintained by Tom Bujok (@tombujok)
Copyright (c) 2014-2015.
@brammool
Copy link
Contributor

This usually means your terminal setup is incorrect, and the terminal sends CTRL-X to Vim at some point. This is the command to decrement a number.
Check your value for $TERM or 'term'.

@persuez
Copy link
Author

persuez commented Jun 26, 2021

This usually means your terminal setup is incorrect, and the terminal sends CTRL-X to Vim at some point. This is the command to decrement a number.
Check your value for $TERM or 'term'.

Thank you for reminding me. I check $TERM and 'term', they are both xterm-256color.

echo $TERM ==> xterm-256color
in vim: echo &term ==> xterm-256color

But versions below 8.2.0936 do not have this problem.

@k-takata
Copy link
Member

This can happen when you set $TERM to xterm on a non-xterm-compatible terminal.

What does :echo v:termresponse show?
Does it still happen when you add set t_RV= in your .vimrc?

@persuez
Copy link
Author

persuez commented Jun 26, 2021

This can happen when you set $TERM to xterm on a non-xterm-compatible terminal.

What does :echo v:termresponse show?
Does it still happen when you add set t_RV= in your .vimrc?

Thanks very much!

:echo v:termresponse ==> ^[[>77;10103;0c

When I set t_RV= in my .vimrc, it behaves normally. Extremely grateful. When setting $TERM to xterm on a non-xterm-compatible terminal, the terminal sends CTRL-X to Vim at some point?

@chrisbra
Copy link
Member

babun is using mintty, isn't? I am not sure what $TERM should be set for babun. Also, it looks like babun is discontinued

@k-takata
Copy link
Member

Ah, I didn't know that.
The above v:termresponse means that it is using mintty 1.1.3.
The latest mintty is 3.5.0 (^[[>77;30500;1300c), so 1.1.3 is really old.

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

4 participants