lalitmetkar / vim

Automatically exported from code.google.com/p/vim
0 stars 0 forks source link

System-calls interferes with &lines #21

Closed GoogleCodeExporter closed 9 years ago

GoogleCodeExporter commented 9 years ago
What steps will reproduce the problem?
1. In your .vimrc file add the following:
   set lines=40
   let temp=system('ls')
2. Start either gvim or vim -g

What is the expected output? What do you see instead?
Vim should be started with its gui and with 40 lines. Instead, the number of 
lines will be reset to the number of lines of the terminal from which Vim was 
started.

What version of the product are you using? On what operating system?
$> vim --version
VIM - Vi IMproved 7.3 (2010 Aug 15, compiled Aug 25 2011 12:51:53)
Included patches: 1-285
Compiled by lervag@lervag-laptop
Huge version with GTK2 GUI.  Features included (+) or not (-):
+arabic +autocmd +balloon_eval +browse ++builtin_terms +byte_offset +cindent 
+clientserver +clipboard +cmdline_compl +cmdline_hist +cmdline_info +comments 
+conceal +cryptv +cscope +cursorbind +cursorshape +dialog_con_gui +diff 
+digraphs +dnd -ebcdic +emacs_tags +eval +ex_extra +extra_search +farsi 
+file_in_path +find_in_path +float +folding -footer +fork() +gettext 
-hangul_input +iconv +insert_expand +jumplist +keymap +langmap +libcall 
+linebreak +lispindent +listcmds +localmap -lua +menu +mksession +modify_fname 
+mouse +mouseshape +mouse_dec +mouse_gpm -mouse_jsbterm +mouse_netterm 
-mouse_sysmouse +mouse_xterm +multi_byte +multi_lang -mzscheme +netbeans_intg 
+path_extra -perl +persistent_undo +postscript +printer +profile +python 
-python3 +quickfix +reltime +rightleft +ruby +scrollbind +signs +smartindent 
-sniff +startuptime +statusline -sun_workshop +syntax +tag_binary 
+tag_old_static -tag_any_white -tcl +terminfo +termresponse +textobjects +title
 +toolbar +user_commands +vertsplit +virtualedit +visual +visualextra +viminfo 
+vreplace +wildignore +wildmenu +windows +writebackup +X11 -xfontset +xim 
+xsmp_interact +xterm_clipboard -xterm_save 
   system vimrc file: "$VIM/vimrc"
     user vimrc file: "$HOME/.vimrc"
      user exrc file: "$HOME/.exrc"
  system gvimrc file: "$VIM/gvimrc"
    user gvimrc file: "$HOME/.gvimrc"
    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/gtk-2.0/include -I/usr/include/atk-1.0 
-I/usr/include/cairo -I/usr/include/gdk-pixbuf-2.0 -I/usr/include/pango-1.0 
-I/usr/include/gio-unix-2.0/ -I/usr/include/glib-2.0 
-I/usr/lib/glib-2.0/include -I/usr/include/pixman-1 -I/usr/include/freetype2 
-I/usr/include/libpng12     -g -O2 -D_FORTIFY_SOURCE=1      
Linking: gcc   -L. -Wl,-Bsymbolic-functions -rdynamic -Wl,-export-dynamic  
-L/usr/local/lib -Wl,--as-needed -o vim   -pthread -lgtk-x11-2.0 -lgdk-x11-2.0 
-latk-1.0 -lgio-2.0 -lpangoft2-1.0 -lpangocairo-1.0 -lgdk_pixbuf-2.0 -lm 
-lcairo -lpng12 -lpango-1.0 -lfreetype -lfontconfig -lgobject-2.0 -lgmodule-2.0 
-lgthread-2.0 -lrt -lglib-2.0   -lSM -lICE -lXpm -lXt -lX11 -lXdmcp -lSM -lICE 
-lm -lncurses -lnsl  -lselinux  -lacl -lattr -lgpm     
-L/usr/lib/python2.6/config -lpython2.6 -lpthread -ldl -lutil -lm -Xlinker 
-export-dynamic -Wl,-O1 -Wl,-Bsymbolic-functions   -lruby1.8 -lpthread -lrt 
-ldl -lcrypt -lm  -L/usr/lib   

Please provide any additional information below.
I have supplied a simply vimrc-file which can be used to test the error with 
the same setup that I have used. I know that I can set &lines in gvimrc, but I 
like to keep all my settings in one file.

Original issue reported on code.google.com by karl.yn...@gmail.com on 25 Aug 2011 at 11:04

Attachments:

GoogleCodeExporter commented 9 years ago
If you don't want to use the .gvimrc, use the GUIEnter autocommand.

But anyhow, here is a that prevents changing the rows too early:
diff --git a/src/ui.c b/src/ui.c
--- a/src/ui.c
+++ b/src/ui.c
@@ -298,7 +298,10 @@
     int            retval;

 #ifdef FEAT_GUI
-    if (gui.in_use)
+    if (gui.starting)
+       /* check later */
+       return OK;
+    else if (gui.in_use)
        retval = gui_get_shellsize();
     else
 #endif

Original comment by chrisbr...@googlemail.com on 21 Aug 2012 at 4:39

GoogleCodeExporter commented 9 years ago
Patch 7.3.635 should fix this.  Please reopen when the problem still happens.

Original comment by brammool...@gmail.com on 23 Aug 2012 at 11:29