From b434a909e627d3efef6ab1c829fff6242d993afe Mon Sep 17 00:00:00 2001 From: Bram Moolenaar Date: Mon, 17 Jan 2011 19:50:06 +0100 Subject: [PATCH 1/8] updated for version 7.3.100 Problem: When using :normal v:count isn't set. Solution: Call normal_cmd() with toplevel set to TRUE. --- src/ex_docmd.c | 2 +- src/version.c | 2 ++ 2 files changed, 3 insertions(+), 1 deletion(-) diff --git a/src/ex_docmd.c b/src/ex_docmd.c index 3265860f40..733d62ee78 100644 --- a/src/ex_docmd.c +++ b/src/ex_docmd.c @@ -9310,7 +9310,7 @@ exec_normal_cmd(cmd, remap, silent) && !got_int) { update_topline_cursor(); - normal_cmd(&oa, FALSE); /* execute a Normal mode cmd */ + normal_cmd(&oa, TRUE); /* execute a Normal mode cmd */ } } #endif diff --git a/src/version.c b/src/version.c index 4e5e1a9350..7e17f43e03 100644 --- a/src/version.c +++ b/src/version.c @@ -714,6 +714,8 @@ static char *(features[]) = static int included_patches[] = { /* Add new patch number below this line */ +/**/ + 100, /**/ 99, /**/ From f2cfab95d8d1b2f0e331eed2ba66bd804296422f Mon Sep 17 00:00:00 2001 From: Bram Moolenaar Date: Mon, 17 Jan 2011 19:53:27 +0100 Subject: [PATCH 2/8] updated for version 7.3.101 Problem: ino_t defined with wrong size. Solution: Move including auto/config.h before other includes. (Marius Geminas) --- src/if_lua.c | 5 ++--- src/if_ruby.c | 6 +++--- src/version.c | 2 ++ 3 files changed, 7 insertions(+), 6 deletions(-) diff --git a/src/if_lua.c b/src/if_lua.c index 3062de8cf1..d3c6a42201 100644 --- a/src/if_lua.c +++ b/src/if_lua.c @@ -9,12 +9,11 @@ * See README.txt for an overview of the Vim source code. */ -#include -#include +#include "vim.h" + #include #include #include -#include "vim.h" /* Only do the following when the feature is enabled. Needed for "make * depend". */ diff --git a/src/if_ruby.c b/src/if_ruby.c index 0f108a1f80..a45269d6e6 100644 --- a/src/if_ruby.c +++ b/src/if_ruby.c @@ -11,13 +11,13 @@ * See README.txt for an overview of the Vim source code. */ -#include -#include - #ifdef HAVE_CONFIG_H # include "auto/config.h" #endif +#include +#include + #ifdef _WIN32 # if !defined(DYNAMIC_RUBY_VER) || (DYNAMIC_RUBY_VER < 18) # define NT diff --git a/src/version.c b/src/version.c index 7e17f43e03..abe414ba0d 100644 --- a/src/version.c +++ b/src/version.c @@ -714,6 +714,8 @@ static char *(features[]) = static int included_patches[] = { /* Add new patch number below this line */ +/**/ + 101, /**/ 100, /**/ From b8e65930d245513ef922313e847295318783f354 Mon Sep 17 00:00:00 2001 From: Bram Moolenaar Date: Mon, 17 Jan 2011 20:08:11 +0100 Subject: [PATCH 3/8] updated for version 7.3.102 Problem: When using ":make", typing the next command and then getting the "reload" prompt the next command is (partly) eaten by the reload prompt. Solution: Accept ':' as a special character at the reload prompt to accept the default choice and execute the command. --- src/eval.c | 4 ++-- src/fileio.c | 2 +- src/gui.c | 2 +- src/gui_athena.c | 3 ++- src/gui_gtk.c | 3 ++- src/gui_mac.c | 3 ++- src/gui_motif.c | 3 ++- src/gui_photon.c | 3 ++- src/gui_w16.c | 3 ++- src/gui_w32.c | 3 ++- src/gui_xmdlg.c | 4 ++-- src/memline.c | 2 +- src/message.c | 19 ++++++++++++++----- src/os_mswin.c | 2 +- src/proto/gui_athena.pro | 2 +- src/proto/gui_gtk.pro | 2 +- src/proto/gui_mac.pro | 2 +- src/proto/gui_motif.pro | 2 +- src/proto/gui_photon.pro | 2 +- src/proto/gui_w16.pro | 2 +- src/proto/gui_w32.pro | 2 +- src/proto/message.pro | 2 +- src/version.c | 2 ++ 23 files changed, 46 insertions(+), 28 deletions(-) diff --git a/src/eval.c b/src/eval.c index a73731198b..a46789fdf0 100644 --- a/src/eval.c +++ b/src/eval.c @@ -9323,7 +9323,7 @@ f_confirm(argvars, rettv) if (!error) rettv->vval.v_number = do_dialog(type, NULL, message, buttons, - def, NULL); + def, NULL, FALSE); #endif } @@ -12744,7 +12744,7 @@ f_inputdialog(argvars, rettv) IObuff[0] = NUL; if (message != NULL && defstr != NULL && do_dialog(VIM_QUESTION, NULL, message, - (char_u *)_("&OK\n&Cancel"), 1, IObuff) == 1) + (char_u *)_("&OK\n&Cancel"), 1, IObuff, FALSE) == 1) rettv->vval.v_string = vim_strsave(IObuff); else { diff --git a/src/fileio.c b/src/fileio.c index fcfb8cd308..0c7b00c2c3 100644 --- a/src/fileio.c +++ b/src/fileio.c @@ -7008,7 +7008,7 @@ buf_check_timestamp(buf, focus) STRCAT(tbuf, mesg2); } if (do_dialog(VIM_WARNING, (char_u *)_("Warning"), tbuf, - (char_u *)_("&OK\n&Load File"), 1, NULL) == 2) + (char_u *)_("&OK\n&Load File"), 1, NULL, TRUE) == 2) reload = TRUE; } else diff --git a/src/gui.c b/src/gui.c index 89d8d5a883..041d6339c4 100644 --- a/src/gui.c +++ b/src/gui.c @@ -4903,7 +4903,7 @@ display_errors() if (STRLEN(p) > 2000) STRCPY(p + 2000 - 14, "...(truncated)"); (void)do_dialog(VIM_ERROR, (char_u *)_("Error"), - p, (char_u *)_("&Ok"), 1, NULL); + p, (char_u *)_("&Ok"), 1, NULL, FALSE); break; } ga_clear(&error_ga); diff --git a/src/gui_athena.c b/src/gui_athena.c index 7cd08c6e36..c8d8e98df0 100644 --- a/src/gui_athena.c +++ b/src/gui_athena.c @@ -2117,13 +2117,14 @@ dialog_wm_handler(w, client_data, event, dum) } int -gui_mch_dialog(type, title, message, buttons, dfltbutton, textfield) +gui_mch_dialog(type, title, message, buttons, dfltbutton, textfield, ex_cmd) int type UNUSED; char_u *title; char_u *message; char_u *buttons; int dfltbutton UNUSED; char_u *textfield; + int ex_cmd UNUSED; { char_u *buts; char_u *p, *next; diff --git a/src/gui_gtk.c b/src/gui_gtk.c index b95f46a7f9..94cebd471b 100644 --- a/src/gui_gtk.c +++ b/src/gui_gtk.c @@ -1268,7 +1268,8 @@ gui_mch_dialog(int type, /* type of dialog */ char_u *message, /* message text */ char_u *buttons, /* names of buttons */ int def_but, /* default button */ - char_u *textfield) /* text for textfield or NULL */ + char_u *textfield, /* text for textfield or NULL */ + int ex_cmd UNUSED) { GtkWidget *dialog; GtkWidget *entry = NULL; diff --git a/src/gui_mac.c b/src/gui_mac.c index 2fcd8a209b..4357c89250 100644 --- a/src/gui_mac.c +++ b/src/gui_mac.c @@ -5583,7 +5583,8 @@ gui_mch_dialog( char_u *message, char_u *buttons, int dfltbutton, - char_u *textfield) + char_u *textfield, + int ex_cmd) { Handle buttonDITL; Handle iconDITL; diff --git a/src/gui_motif.c b/src/gui_motif.c index 51e6112ccd..7cac8ee6a2 100644 --- a/src/gui_motif.c +++ b/src/gui_motif.c @@ -2549,13 +2549,14 @@ create_pixmap_label(parent, name, data, args, arg) #endif int -gui_mch_dialog(type, title, message, button_names, dfltbutton, textfield) +gui_mch_dialog(type, title, message, button_names, dfltbutton, textfield, ex_cmd) int type UNUSED; char_u *title; char_u *message; char_u *button_names; int dfltbutton; char_u *textfield; /* buffer of size IOSIZE */ + int ex_cmd UNUSED; { char_u *buts; char_u *p, *next; diff --git a/src/gui_photon.c b/src/gui_photon.c index 42b124281a..d9017989ab 100644 --- a/src/gui_photon.c +++ b/src/gui_photon.c @@ -1502,7 +1502,8 @@ gui_mch_dialog( char_u *message, char_u *buttons, int default_button, - char_u *textfield) + char_u *textfield, + int ex_cmd) { char_u *str; char_u **button_array; diff --git a/src/gui_w16.c b/src/gui_w16.c index 68667846b9..5ef8c10312 100644 --- a/src/gui_w16.c +++ b/src/gui_w16.c @@ -1098,7 +1098,8 @@ gui_mch_dialog( char_u *message, char_u *buttons, int dfltbutton, - char_u *textfield) + char_u *textfield, + int ex_cmd) { FARPROC dp; LPWORD p, pnumitems; diff --git a/src/gui_w32.c b/src/gui_w32.c index f3b9c5bb68..cdb1abb583 100644 --- a/src/gui_w32.c +++ b/src/gui_w32.c @@ -3005,7 +3005,8 @@ gui_mch_dialog( char_u *message, char_u *buttons, int dfltbutton, - char_u *textfield) + char_u *textfield, + int ex_cmd) { WORD *p, *pdlgtemplate, *pnumitems; DWORD *dwp; diff --git a/src/gui_xmdlg.c b/src/gui_xmdlg.c index 1ae755e822..73142e28c9 100644 --- a/src/gui_xmdlg.c +++ b/src/gui_xmdlg.c @@ -688,7 +688,7 @@ do_choice(Widget w, do_dialog(VIM_ERROR, (char_u *)_("Error"), (char_u *)_("Invalid font specification"), - (char_u *)_("&Dismiss"), 1, NULL); + (char_u *)_("&Dismiss"), 1, NULL, FALSE); return True; } @@ -807,7 +807,7 @@ ok_callback(Widget w UNUSED, do_dialog(VIM_ERROR, (char_u *)_("Error"), (char_u *)_("Invalid font specification"), - (char_u *)_("&Dismiss"), 1, NULL); + (char_u *)_("&Dismiss"), 1, NULL, FALSE); XFreeFontNames(name); } else diff --git a/src/memline.c b/src/memline.c index 0beaf54722..410b1161b6 100644 --- a/src/memline.c +++ b/src/memline.c @@ -4516,7 +4516,7 @@ findswapname(buf, dirp, old_fname) process_still_running ? (char_u *)_("&Open Read-Only\n&Edit anyway\n&Recover\n&Quit\n&Abort") : # endif - (char_u *)_("&Open Read-Only\n&Edit anyway\n&Recover\n&Delete it\n&Quit\n&Abort"), 1, NULL); + (char_u *)_("&Open Read-Only\n&Edit anyway\n&Recover\n&Delete it\n&Quit\n&Abort"), 1, NULL, FALSE); # if defined(UNIX) || defined(__EMX__) || defined(VMS) if (process_still_running && choice >= 4) diff --git a/src/message.c b/src/message.c index 930fca117c..0094725048 100644 --- a/src/message.c +++ b/src/message.c @@ -3315,7 +3315,7 @@ msg_advance(col) * different letter. */ int -do_dialog(type, title, message, buttons, dfltbutton, textfield) +do_dialog(type, title, message, buttons, dfltbutton, textfield, ex_cmd) int type UNUSED; char_u *title UNUSED; char_u *message; @@ -3323,6 +3323,8 @@ do_dialog(type, title, message, buttons, dfltbutton, textfield) int dfltbutton; char_u *textfield UNUSED; /* IObuff for inputdialog(), NULL otherwise */ + int ex_cmd; /* when TRUE pressing : accepts default and starts + Ex command */ { int oldState; int retval = 0; @@ -3341,7 +3343,7 @@ do_dialog(type, title, message, buttons, dfltbutton, textfield) if (gui.in_use && vim_strchr(p_go, GO_CONDIALOG) == NULL) { c = gui_mch_dialog(type, title, message, buttons, dfltbutton, - textfield); + textfield, ex_cmd); /* avoid a hit-enter prompt without clearing the cmdline */ need_wait_return = FALSE; emsg_on_display = FALSE; @@ -3388,6 +3390,13 @@ do_dialog(type, title, message, buttons, dfltbutton, textfield) default: /* Could be a hotkey? */ if (c < 0) /* special keys are ignored here */ continue; + if (c == ':' && ex_cmd) + { + retval = dfltbutton; + ins_char_typebuf(':'); + break; + } + /* Make the character lowercase, as chars in "hotkeys" are. */ c = MB_TOLOWER(c); retval = 1; @@ -3661,7 +3670,7 @@ vim_dialog_yesno(type, title, message, dflt) if (do_dialog(type, title == NULL ? (char_u *)_("Question") : title, message, - (char_u *)_("&Yes\n&No"), dflt, NULL) == 1) + (char_u *)_("&Yes\n&No"), dflt, NULL, FALSE) == 1) return VIM_YES; return VIM_NO; } @@ -3676,7 +3685,7 @@ vim_dialog_yesnocancel(type, title, message, dflt) switch (do_dialog(type, title == NULL ? (char_u *)_("Question") : title, message, - (char_u *)_("&Yes\n&No\n&Cancel"), dflt, NULL)) + (char_u *)_("&Yes\n&No\n&Cancel"), dflt, NULL, FALSE)) { case 1: return VIM_YES; case 2: return VIM_NO; @@ -3695,7 +3704,7 @@ vim_dialog_yesnoallcancel(type, title, message, dflt) title == NULL ? (char_u *)"Question" : title, message, (char_u *)_("&Yes\n&No\nSave &All\n&Discard All\n&Cancel"), - dflt, NULL)) + dflt, NULL, FALSE)) { case 1: return VIM_YES; case 2: return VIM_NO; diff --git a/src/os_mswin.c b/src/os_mswin.c index 0b9dfd91e5..8be2d40afc 100644 --- a/src/os_mswin.c +++ b/src/os_mswin.c @@ -593,7 +593,7 @@ display_errors() gui.starting ? (char_u *)_("Message") : #endif (char_u *)_("Error"), - p, (char_u *)_("&Ok"), 1, NULL); + p, (char_u *)_("&Ok"), 1, NULL, FALSE); break; } ga_clear(&error_ga); diff --git a/src/proto/gui_athena.pro b/src/proto/gui_athena.pro index 353c33b075..efc8e40d3c 100644 --- a/src/proto/gui_athena.pro +++ b/src/proto/gui_athena.pro @@ -27,5 +27,5 @@ void gui_mch_destroy_scrollbar __ARGS((scrollbar_T *sb)); void gui_mch_set_scrollbar_colors __ARGS((scrollbar_T *sb)); Window gui_x11_get_wid __ARGS((void)); char_u *gui_mch_browse __ARGS((int saving, char_u *title, char_u *dflt, char_u *ext, char_u *initdir, char_u *filter)); -int gui_mch_dialog __ARGS((int type, char_u *title, char_u *message, char_u *buttons, int dfltbutton, char_u *textfield)); +int gui_mch_dialog __ARGS((int type, char_u *title, char_u *message, char_u *buttons, int dfltbutton, char_u *textfield, int ex_cmd)); /* vim: set ft=c : */ diff --git a/src/proto/gui_gtk.pro b/src/proto/gui_gtk.pro index 8b883582ad..2bff89be72 100644 --- a/src/proto/gui_gtk.pro +++ b/src/proto/gui_gtk.pro @@ -13,7 +13,7 @@ void gui_mch_create_scrollbar __ARGS((scrollbar_T *sb, int orient)); void gui_mch_destroy_scrollbar __ARGS((scrollbar_T *sb)); char_u *gui_mch_browse __ARGS((int saving, char_u *title, char_u *dflt, char_u *ext, char_u *initdir, char_u *filter)); char_u *gui_mch_browsedir __ARGS((char_u *title, char_u *initdir)); -int gui_mch_dialog __ARGS((int type, char_u *title, char_u *message, char_u *buttons, int def_but, char_u *textfield)); +int gui_mch_dialog __ARGS((int type, char_u *title, char_u *message, char_u *buttons, int def_but, char_u *textfield, int ex_cmd)); void gui_mch_show_popupmenu __ARGS((vimmenu_T *menu)); void gui_make_popup __ARGS((char_u *path_name, int mouse_pos)); void gui_mch_find_dialog __ARGS((exarg_T *eap)); diff --git a/src/proto/gui_mac.pro b/src/proto/gui_mac.pro index ba6e2ad42d..2010f978c6 100644 --- a/src/proto/gui_mac.pro +++ b/src/proto/gui_mac.pro @@ -81,7 +81,7 @@ int gui_mch_get_mouse_x __ARGS((void)); int gui_mch_get_mouse_y __ARGS((void)); void gui_mch_setmouse __ARGS((int x, int y)); void gui_mch_show_popupmenu __ARGS((vimmenu_T *menu)); -int gui_mch_dialog __ARGS((int type, char_u *title, char_u *message, char_u *buttons, int dfltbutton, char_u *textfield)); +int gui_mch_dialog __ARGS((int type, char_u *title, char_u *message, char_u *buttons, int dfltbutton, char_u *textfield, int ex_cmd)); char_u *gui_mch_browse __ARGS((int saving, char_u *title, char_u *dflt, char_u *ext, char_u *initdir, char_u *filter)); void gui_mch_set_foreground __ARGS((void)); void gui_mch_show_tabline __ARGS((int showit)); diff --git a/src/proto/gui_motif.pro b/src/proto/gui_motif.pro index 3e08ec9dbd..e455f0161b 100644 --- a/src/proto/gui_motif.pro +++ b/src/proto/gui_motif.pro @@ -29,7 +29,7 @@ void gui_mch_destroy_scrollbar __ARGS((scrollbar_T *sb)); void gui_mch_set_scrollbar_colors __ARGS((scrollbar_T *sb)); Window gui_x11_get_wid __ARGS((void)); char_u *gui_mch_browse __ARGS((int saving, char_u *title, char_u *dflt, char_u *ext, char_u *initdir, char_u *filter)); -int gui_mch_dialog __ARGS((int type, char_u *title, char_u *message, char_u *button_names, int dfltbutton, char_u *textfield)); +int gui_mch_dialog __ARGS((int type, char_u *title, char_u *message, char_u *button_names, int dfltbutton, char_u *textfield, int ex_cmd)); void gui_mch_enable_footer __ARGS((int showit)); void gui_mch_set_footer __ARGS((char_u *s)); void gui_mch_show_toolbar __ARGS((int showit)); diff --git a/src/proto/gui_photon.pro b/src/proto/gui_photon.pro index 6a3ff04b72..0a5041e506 100644 --- a/src/proto/gui_photon.pro +++ b/src/proto/gui_photon.pro @@ -8,7 +8,7 @@ void gui_mch_exit __ARGS((int rc)); void gui_mch_update __ARGS((void)); int gui_mch_wait_for_chars __ARGS((int wtime)); char_u *gui_mch_browse __ARGS((int saving, char_u *title, char_u *default_name, char_u *ext, char_u *initdir, char_u *filter)); -int gui_mch_dialog __ARGS((int type, char_u *title, char_u *message, char_u *buttons, int default_button, char_u *textfield)); +int gui_mch_dialog __ARGS((int type, char_u *title, char_u *message, char_u *buttons, int default_button, char_u *textfield, int ex_cmd)); int gui_mch_get_winpos __ARGS((int *x, int *y)); void gui_mch_set_winpos __ARGS((int x, int y)); void gui_mch_set_shellsize __ARGS((int width, int height, int min_width, int min_height, int base_width, int base_height, int direction)); diff --git a/src/proto/gui_w16.pro b/src/proto/gui_w16.pro index 0f82c5afe6..c8cb06590d 100644 --- a/src/proto/gui_w16.pro +++ b/src/proto/gui_w16.pro @@ -74,6 +74,6 @@ void gui_make_popup __ARGS((char_u *path_name, int mouse_pos)); void gui_mch_add_menu_item __ARGS((vimmenu_T *menu, int idx)); void gui_mch_destroy_menu __ARGS((vimmenu_T *menu)); void gui_mch_menu_grey __ARGS((vimmenu_T *menu, int grey)); -int gui_mch_dialog __ARGS((int type, char_u *title, char_u *message, char_u *buttons, int dfltbutton, char_u *textfield)); +int gui_mch_dialog __ARGS((int type, char_u *title, char_u *message, char_u *buttons, int dfltbutton, char_u *textfield, int ex_cmd)); void gui_mch_set_foreground __ARGS((void)); /* vim: set ft=c : */ diff --git a/src/proto/gui_w32.pro b/src/proto/gui_w32.pro index 657a4c65b4..49690b03e4 100644 --- a/src/proto/gui_w32.pro +++ b/src/proto/gui_w32.pro @@ -81,7 +81,7 @@ void gui_make_tearoff __ARGS((char_u *path_name)); void gui_mch_add_menu_item __ARGS((vimmenu_T *menu, int idx)); void gui_mch_destroy_menu __ARGS((vimmenu_T *menu)); void gui_mch_menu_grey __ARGS((vimmenu_T *menu, int grey)); -int gui_mch_dialog __ARGS((int type, char_u *title, char_u *message, char_u *buttons, int dfltbutton, char_u *textfield)); +int gui_mch_dialog __ARGS((int type, char_u *title, char_u *message, char_u *buttons, int dfltbutton, char_u *textfield, int ex_cmd)); void gui_mch_set_foreground __ARGS((void)); void gui_mch_drawsign __ARGS((int row, int col, int typenr)); void *gui_mch_register_sign __ARGS((char_u *signfile)); diff --git a/src/proto/message.pro b/src/proto/message.pro index a752ddcf56..c59a9165f4 100644 --- a/src/proto/message.pro +++ b/src/proto/message.pro @@ -64,7 +64,7 @@ void verbose_stop __ARGS((void)); int verbose_open __ARGS((void)); void give_warning __ARGS((char_u *message, int hl)); void msg_advance __ARGS((int col)); -int do_dialog __ARGS((int type, char_u *title, char_u *message, char_u *buttons, int dfltbutton, char_u *textfield)); +int do_dialog __ARGS((int type, char_u *title, char_u *message, char_u *buttons, int dfltbutton, char_u *textfield, int ex_cmd)); void display_confirm_msg __ARGS((void)); int vim_dialog_yesno __ARGS((int type, char_u *title, char_u *message, int dflt)); int vim_dialog_yesnocancel __ARGS((int type, char_u *title, char_u *message, int dflt)); diff --git a/src/version.c b/src/version.c index abe414ba0d..3f6a8a1405 100644 --- a/src/version.c +++ b/src/version.c @@ -714,6 +714,8 @@ static char *(features[]) = static int included_patches[] = { /* Add new patch number below this line */ +/**/ + 102, /**/ 101, /**/ From 9285b887ecda311f1fd81ce29c6be9304c934072 Mon Sep 17 00:00:00 2001 From: Bram Moolenaar Date: Sat, 22 Jan 2011 00:11:50 +0100 Subject: [PATCH 4/8] updated for version 7.3.103 Problem: Changing 'fileformat' and then using ":w" in an empty file sets the 'modified' option. Solution: In unchanged() don't ignore 'ff' for an empty file. --- .hgignore | 8 ++++++++ src/misc1.c | 2 +- src/option.c | 9 ++++++--- src/proto/option.pro | 2 +- src/undo.c | 4 ++-- src/version.c | 2 ++ 6 files changed, 20 insertions(+), 7 deletions(-) diff --git a/.hgignore b/.hgignore index 47bd0b98cf..f676fbae90 100644 --- a/.hgignore +++ b/.hgignore @@ -42,3 +42,11 @@ gvimext.lib *.mo *.swp *~ + +# Generated by "make test" +src/po/*.ck +src/testdir/mbyte.vim +src/testdir/mzscheme.vim +src/testdir/small.vim +src/testdir/tiny.vim +src/testdir/test*.out diff --git a/src/misc1.c b/src/misc1.c index 7235617fce..9f3eff157d 100644 --- a/src/misc1.c +++ b/src/misc1.c @@ -2919,7 +2919,7 @@ unchanged(buf, ff) buf_T *buf; int ff; /* also reset 'fileformat' */ { - if (buf->b_changed || (ff && file_ff_differs(buf))) + if (buf->b_changed || (ff && file_ff_differs(buf, FALSE))) { buf->b_changed = 0; ml_setflags(buf); diff --git a/src/option.c b/src/option.c index 87eadd04fd..f1fcd69d0f 100644 --- a/src/option.c +++ b/src/option.c @@ -11296,16 +11296,19 @@ save_file_ff(buf) * from when editing started (save_file_ff() called). * Also when 'endofline' was changed and 'binary' is set, or when 'bomb' was * changed and 'binary' is not set. - * Don't consider a new, empty buffer to be changed. + * When "ignore_empty" is true don't consider a new, empty buffer to be + * changed. */ int -file_ff_differs(buf) +file_ff_differs(buf, ignore_empty) buf_T *buf; + int ignore_empty; { /* In a buffer that was never loaded the options are not valid. */ if (buf->b_flags & BF_NEVERLOADED) return FALSE; - if ((buf->b_flags & BF_NEW) + if (ignore_empty + && (buf->b_flags & BF_NEW) && buf->b_ml.ml_line_count == 1 && *ml_get_buf(buf, (linenr_T)1, FALSE) == NUL) return FALSE; diff --git a/src/proto/option.pro b/src/proto/option.pro index d14c89b285..15cf2b4f85 100644 --- a/src/proto/option.pro +++ b/src/proto/option.pro @@ -54,6 +54,6 @@ void change_compatible __ARGS((int on)); int option_was_set __ARGS((char_u *name)); int can_bs __ARGS((int what)); void save_file_ff __ARGS((buf_T *buf)); -int file_ff_differs __ARGS((buf_T *buf)); +int file_ff_differs __ARGS((buf_T *buf, int ignore_empty)); int check_ff_value __ARGS((char_u *p)); /* vim: set ft=c : */ diff --git a/src/undo.c b/src/undo.c index ec7b1a4aec..af91bd3cdb 100644 --- a/src/undo.c +++ b/src/undo.c @@ -3304,7 +3304,7 @@ bufIsChanged(buf) #ifdef FEAT_QUICKFIX !bt_dontwrite(buf) && #endif - (buf->b_changed || file_ff_differs(buf)); + (buf->b_changed || file_ff_differs(buf, TRUE)); } int @@ -3314,7 +3314,7 @@ curbufIsChanged() #ifdef FEAT_QUICKFIX !bt_dontwrite(curbuf) && #endif - (curbuf->b_changed || file_ff_differs(curbuf)); + (curbuf->b_changed || file_ff_differs(curbuf, TRUE)); } #if defined(FEAT_EVAL) || defined(PROTO) diff --git a/src/version.c b/src/version.c index 3f6a8a1405..107cdea693 100644 --- a/src/version.c +++ b/src/version.c @@ -714,6 +714,8 @@ static char *(features[]) = static int included_patches[] = { /* Add new patch number below this line */ +/**/ + 103, /**/ 102, /**/ From dba2afde7d5abc607ef0832b99dca6ed54dd2ef0 Mon Sep 17 00:00:00 2001 From: Bram Moolenaar Date: Sat, 22 Jan 2011 00:58:20 +0100 Subject: [PATCH 5/8] updated for version 7.3.104 Problem: Conceal: using Tab for cchar causes problems. (ZyX) Solution: Do not accept a control character for cchar. --- src/syntax.c | 7 +++++++ src/version.c | 2 ++ 2 files changed, 9 insertions(+) diff --git a/src/syntax.c b/src/syntax.c index d2a99a4f79..369311fb74 100644 --- a/src/syntax.c +++ b/src/syntax.c @@ -4537,6 +4537,13 @@ get_syn_options(arg, opt, conceal_char) ; #endif } +#ifdef FEAT_CONCEAL + if (!vim_isprintc_strict(*conceal_char)) + { + EMSG(_("E844: invalid cchar value")); + return NULL; + } +#endif arg = skipwhite(arg + 7); } else diff --git a/src/version.c b/src/version.c index 107cdea693..1cb55bfec1 100644 --- a/src/version.c +++ b/src/version.c @@ -714,6 +714,8 @@ static char *(features[]) = static int included_patches[] = { /* Add new patch number below this line */ +/**/ + 104, /**/ 103, /**/ From 43592906a00b5e343b9897822bf477b30335511a Mon Sep 17 00:00:00 2001 From: Bram Moolenaar Date: Sat, 22 Jan 2011 01:13:39 +0100 Subject: [PATCH 6/8] updated for version 7.3.105 Problem: Can't get the value of "b:changedtick" with getbufvar(). Solution: Make it work. (Christian Brabandt) --- src/eval.c | 5 +++++ src/version.c | 2 ++ 2 files changed, 7 insertions(+) diff --git a/src/eval.c b/src/eval.c index a46789fdf0..af4ba893ff 100644 --- a/src/eval.c +++ b/src/eval.c @@ -10866,6 +10866,11 @@ f_getbufvar(argvars, rettv) if (*varname == '&') /* buffer-local-option */ get_option_tv(&varname, rettv, TRUE); + else if (STRCMP(varname, "changedtick") == 0) + { + rettv->v_type = VAR_NUMBER; + rettv->vval.v_number = curbuf->b_changedtick; + } else { if (*varname == NUL) diff --git a/src/version.c b/src/version.c index 1cb55bfec1..c16a374359 100644 --- a/src/version.c +++ b/src/version.c @@ -714,6 +714,8 @@ static char *(features[]) = static int included_patches[] = { /* Add new patch number below this line */ +/**/ + 105, /**/ 104, /**/ From ade0ce2c47ba2062c93c0d73b68ce2d63c03fe4f Mon Sep 17 00:00:00 2001 From: Bram Moolenaar Date: Sat, 22 Jan 2011 21:05:07 +0100 Subject: [PATCH 7/8] updated for version 7.3.106 Problem: When 'cursorbind' is set another window may scroll unexpectedly when 'scrollbind' is also set. (Xavier Wang) Solution: Don't call update_topline() if 'scrollbind' is set. --- src/move.c | 6 ++++-- src/version.c | 2 ++ 2 files changed, 6 insertions(+), 2 deletions(-) diff --git a/src/move.c b/src/move.c index 173063134a..447445b461 100644 --- a/src/move.c +++ b/src/move.c @@ -2882,9 +2882,11 @@ do_check_cursorbind() if (has_mbyte) mb_adjust_cursor(); # endif - redraw_later(VALID); - update_topline(); + + /* Only scroll when 'scrollbind' hasn't done this. */ + if (!curwin->w_p_scb) + update_topline(); # ifdef FEAT_WINDOWS curwin->w_redr_status = TRUE; # endif diff --git a/src/version.c b/src/version.c index c16a374359..0e08703646 100644 --- a/src/version.c +++ b/src/version.c @@ -714,6 +714,8 @@ static char *(features[]) = static int included_patches[] = { /* Add new patch number below this line */ +/**/ + 106, /**/ 105, /**/ From 38b167abc56cb46ec38c0ba7f70cc8e84c277e11 Mon Sep 17 00:00:00 2001 From: Bram Moolenaar Date: Sat, 22 Jan 2011 21:25:11 +0100 Subject: [PATCH 8/8] updated for version 7.3.107 Problem: Year number for :undolist can be confused with month or day. Solution: Change "%y" to "%Y". --- src/undo.c | 2 +- src/version.c | 2 ++ 2 files changed, 3 insertions(+), 1 deletion(-) diff --git a/src/undo.c b/src/undo.c index af91bd3cdb..998f3f3ae1 100644 --- a/src/undo.c +++ b/src/undo.c @@ -2884,7 +2884,7 @@ u_add_time(buf, buflen, tt) (void)strftime((char *)buf, buflen, "%m/%d %H:%M:%S", curtime); else /* long ago */ - (void)strftime((char *)buf, buflen, "%y/%m/%d %H:%M:%S", curtime); + (void)strftime((char *)buf, buflen, "%Y/%m/%d %H:%M:%S", curtime); } else #endif diff --git a/src/version.c b/src/version.c index 0e08703646..12aa05b8f0 100644 --- a/src/version.c +++ b/src/version.c @@ -714,6 +714,8 @@ static char *(features[]) = static int included_patches[] = { /* Add new patch number below this line */ +/**/ + 107, /**/ 106, /**/