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

When file is not modified, Codi updates on every cursor move #54

Open
jparoz opened this issue Nov 30, 2016 · 2 comments
Open

When file is not modified, Codi updates on every cursor move #54

jparoz opened this issue Nov 30, 2016 · 2 comments
Labels

Comments

@jparoz
Copy link

jparoz commented Nov 30, 2016

Issue description

When I'm using Codi while editing a Lua file in MacVim, if the file is not modified, Codi updates every time I move the cursor. This is in contrast to what happens when the file is modified, when Codi updates every time the text changes (when TextChanged or TextChangedI fires). As far as I can tell, this only happens with Lua files.

Steps to reproduce:

  • mvim foo.lua
  • Enter insert mode and type print(os.date())
  • Save (:w)
  • Start Codi (:Codi)
    Now Codi is updated whenever the cursor is moved, even though text hasn't changed.
  • Cause the buffer to be modified (on a new line: print("foo"))
    The frantic updating stops, and Codi now updates as expected, when text is changed.
  • Undo (u)
    The buffer is no longer 'modified', and erratic behaviour resumes.

After modifing the buffer the first time after saving (here with print("foo")), Codi works as expected, even after saving again, until I use u to undo into a state where the buffer is not modified.

Other undesirable behaviours include syntax highlighting flickering off and on whenever Codi is erratically updating, and the undo history sometimes (seemingly randomly) being clobbered.

Environment

Running macOS Sierra (10.12.1)
Last line of script manpage is BSD December 4 2013

The log file is over two thousand lines long, generated in about 30 seconds. Almost every keypress generates several log lines when this issue is happening, which may make the log hard to read.

Output of mvim --version:

VIM - Vi IMproved 8.0 (2016 Sep 12, compiled Oct  9 2016 17:45:26)
MacOS X (unix) version
Included patches: 1-27
Compiled by [email protected]
Huge version with MacVim GUI.  Features included (+) or not (-):
+acl             +find_in_path    -mouse_sysmouse  -tag_any_white
+arabic          +float           +mouse_urxvt     -tcl
+autocmd         +folding         +mouse_xterm     +termguicolors
+balloon_eval    -footer          +multi_byte      +terminfo
+browse          +fork()          +multi_lang      +termresponse
++builtin_terms  +fullscreen      -mzscheme        +textobjects
+byte_offset     -gettext         +netbeans_intg   +timers
+channel         -hangul_input    +num64           +title
+cindent         +iconv           +odbeditor       +toolbar
+clientserver    +insert_expand   +packages        +transparency
+clipboard       +job             +path_extra      +user_commands
+cmdline_compl   +jumplist        +perl/dyn        +vertsplit
+cmdline_hist    +keymap          +persistent_undo +virtualedit
+cmdline_info    +lambda          +postscript      +visual
+comments        +langmap         +printer         +visualextra
+conceal         +libcall         +profile         +viminfo
+cryptv          +linebreak       +python/dyn      +vreplace
+cscope          +lispindent      +python3/dyn     +wildignore
+cursorbind      +listcmds        +quickfix        +wildmenu
+cursorshape     +localmap        +reltime         +windows
+dialog_con_gui  +lua/dyn         +rightleft       +writebackup
+diff            +menu            +ruby/dyn        -X11
+digraphs        +mksession       +scrollbind      -xfontset
+dnd             +modify_fname    +signs           +xim
-ebcdic          +mouse           +smartindent     -xpm
+emacs_tags      +mouseshape      +startuptime     -xsmp
+eval            +mouse_dec       +statusline      -xterm_clipboard
+ex_extra        -mouse_gpm       -sun_workshop    -xterm_save
+extra_search    -mouse_jsbterm   +syntax          
+farsi           +mouse_netterm   +tag_binary      
+file_in_path    +mouse_sgr       +tag_old_static  
   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: "/Applications/MacVim.app/Contents/Resources/vim"
Compilation: clang -c -I. -Iproto -DHAVE_CONFIG_H -DFEAT_GUI_MACVIM -Wall -Wno-unknown-pragmas -pipe  -DMACOS_X_UNIX  -g -O2 -U_FORTIFY_SOURCE -D_FORTIFY_SOURCE=1      
Linking: clang   -L. -fstack-protector -L/usr/local/opt/libyaml/lib -L/usr/local/opt/readline/lib -L/usr/local/opt/libksba/lib -L/usr/local/opt/openssl/lib  -L. -fstack-protector -L/usr/local/opt/libyaml/lib -L/usr/local/opt/readline/lib -L/usr/local/opt/libksba/lib -L/usr/local/opt/openssl/lib   -L/usr/local/lib -o Vim -framework Cocoa -framework Carbon       -lm  -lncurses -liconv -framework Cocoa   -fstack-protector  -L/System/Library/Perl/5.16/darwin-thread-multi-2level/CORE 
@metakirby5
Copy link
Owner

Can't seem to reproduce with same macOS, script, and mvim versions 😖 Does this occur with a minimal .vimrc as well, i.e. taking everything out except for a plugin manager + Codi?

@jparoz
Copy link
Author

jparoz commented Dec 3, 2016

With vimrc:

filetype plugin indent on
syntax on
packloadall

and contents of .vim:

  • vimrc (no ~/.vimrc)
  • pack/jlp/start/codi.vim (directly cloned)

I'm still getting the described behaviour. Are there any dependencies I'm not thinking of, or anything else I could have configured differently?

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
None yet
Development

No branches or pull requests

2 participants