Skip to content

HTTPS clone URL

Subversion checkout URL

You can clone with HTTPS or Subversion.

Download ZIP
Browse files

Merged from the latest developing branch.

git-svn-id: https://vim.svn.sourceforge.net/svnroot/vim/trunk@1363 2a77ed30-b011-0410-a7ad-c7884a0aa172
  • Loading branch information...
commit b858e5ee5416779849ccb1795901fe1e7aae4f55 1 parent 6fe4031
edyfox authored
View
5 src/ex_cmds.c
@@ -2707,7 +2707,12 @@ do_write(eap)
if (eap->cmdidx == CMD_saveas)
{
if (retval == OK)
+ {
curbuf->b_p_ro = FALSE;
+#ifdef FEAT_WINDOWS
+ redraw_tabline = TRUE;
+#endif
+ }
/* Change directories when the 'acd' option is set. */
DO_AUTOCHDIR
}
View
5 src/message.c
@@ -3309,7 +3309,10 @@ do_dialog(type, title, message, buttons, dfltbutton, textfield)
{
c = gui_mch_dialog(type, title, message, buttons, dfltbutton,
textfield);
- msg_end_prompt();
+ /* avoid a hit-enter prompt without clearing the cmdline */
+ need_wait_return = FALSE;
+ emsg_on_display = FALSE;
+ cmdline_row = msg_row;
/* Flush output to avoid that further messages and redrawing is done
* in the wrong order. */
View
67 src/option.c
@@ -4119,11 +4119,23 @@ do_set(arg, opt_flags)
&& options[opt_idx].var == VAR_WIN)
goto skip;
- /* Disallow changing some options from modelines */
- if ((opt_flags & OPT_MODELINE) && (flags & P_SECURE))
+ /* Disallow changing some options from modelines. */
+ if (opt_flags & OPT_MODELINE)
{
- errmsg = (char_u *)_("E520: Not allowed in a modeline");
- goto skip;
+ if (flags & P_SECURE)
+ {
+ errmsg = (char_u *)_("E520: Not allowed in a modeline");
+ goto skip;
+ }
+#ifdef FEAT_DIFF
+ /* In diff mode some options are overruled. This avoids that
+ * 'foldmethod' becomes "marker" instead of "diff" and that
+ * "wrap" gets set. */
+ if (curwin->w_p_diff
+ && (options[opt_idx].indir == PV_FDM
+ || options[opt_idx].indir == PV_WRAP))
+ goto skip;
+#endif
}
#ifdef HAVE_SANDBOX
@@ -5268,6 +5280,21 @@ insecure_flag(opt_idx, opt_flags)
}
#endif
+#ifdef FEAT_TITLE
+static void redraw_titles __ARGS((void));
+
+/*
+ * Redraw the window title and/or tab page text later.
+ */
+static void redraw_titles()
+{
+ need_maketitle = TRUE;
+# ifdef FEAT_WINDOWS
+ redraw_tabline = TRUE;
+# endif
+}
+#endif
+
/*
* Set a string option to a new value (without checking the effect).
* The string is copied into allocated memory.
@@ -5672,7 +5699,7 @@ did_set_string_option(opt_idx, varp, new_value_alloced, oldval, errbuf,
{
# ifdef FEAT_TITLE
/* May show a "+" in the title now. */
- need_maketitle = TRUE;
+ redraw_titles();
# endif
/* Add 'fileencoding' to the swap file. */
ml_setflags(curbuf);
@@ -5691,7 +5718,7 @@ did_set_string_option(opt_idx, varp, new_value_alloced, oldval, errbuf,
{
errmsg = mb_init();
# ifdef FEAT_TITLE
- need_maketitle = TRUE;
+ redraw_titles();
# endif
}
}
@@ -5800,7 +5827,7 @@ did_set_string_option(opt_idx, varp, new_value_alloced, oldval, errbuf,
else
curbuf->b_p_tx = FALSE;
#ifdef FEAT_TITLE
- need_maketitle = TRUE;
+ redraw_titles();
#endif
/* update flag in swap file */
ml_setflags(curbuf);
@@ -7127,22 +7154,28 @@ set_bool_option(opt_idx, varp, value, opt_flags)
curbuf->b_did_warn = FALSE;
#ifdef FEAT_TITLE
- need_maketitle = TRUE;
+ redraw_titles();
#endif
}
#ifdef FEAT_TITLE
/* when 'modifiable' is changed, redraw the window title */
else if ((int *)varp == &curbuf->b_p_ma)
- need_maketitle = TRUE;
+ {
+ redraw_titles();
+ }
/* when 'endofline' is changed, redraw the window title */
else if ((int *)varp == &curbuf->b_p_eol)
- need_maketitle = TRUE;
-#ifdef FEAT_MBYTE
- /* when 'bomb' is changed, redraw the window title */
+ {
+ redraw_titles();
+ }
+# ifdef FEAT_MBYTE
+ /* when 'bomb' is changed, redraw the window title and tab page text */
else if ((int *)varp == &curbuf->b_p_bomb)
- need_maketitle = TRUE;
-#endif
+ {
+ redraw_titles();
+ }
+# endif
#endif
/* when 'bin' is set also set some other options */
@@ -7150,7 +7183,7 @@ set_bool_option(opt_idx, varp, value, opt_flags)
{
set_options_bin(old_value, curbuf->b_p_bin, opt_flags);
#ifdef FEAT_TITLE
- need_maketitle = TRUE;
+ redraw_titles();
#endif
}
@@ -7301,7 +7334,7 @@ set_bool_option(opt_idx, varp, value, opt_flags)
if (!value)
save_file_ff(curbuf); /* Buffer is unchanged */
#ifdef FEAT_TITLE
- need_maketitle = TRUE;
+ redraw_titles();
#endif
#ifdef FEAT_AUTOCMD
modified_was_set = value;
@@ -7736,7 +7769,7 @@ set_num_option(opt_idx, varp, value, errbuf, errbuflen, opt_flags)
newFoldLevel();
}
- /* 'foldminlevel' */
+ /* 'foldminlines' */
else if (pp == &curwin->w_p_fml)
{
foldUpdateAll(curwin);
View
9 src/spell.c
@@ -2376,7 +2376,7 @@ spell_move_to(wp, dir, allwords, curline, attrp)
/* If we are back at the starting line and there is no match then
* give up. */
- if (lnum == wp->w_cursor.lnum && !found_one)
+ if (lnum == wp->w_cursor.lnum && (!found_one || wrapped))
break;
/* Skip the characters at the start of the next line that were
@@ -4956,13 +4956,16 @@ typedef struct compitem_S
* Structure that is used to store the items in the word tree. This avoids
* the need to keep track of each allocated thing, everything is freed all at
* once after ":mkspell" is done.
+ * Note: "sb_next" must be just before "sb_data" to make sure the alignment of
+ * "sb_data" is correct for systems where pointers must be aligned on
+ * pointer-size boundaries and sizeof(pointer) > sizeof(int) (e.g., Sparc).
*/
#define SBLOCKSIZE 16000 /* size of sb_data */
typedef struct sblock_S sblock_T;
struct sblock_S
{
- sblock_T *sb_next; /* next block in list */
int sb_used; /* nr of bytes already in use */
+ sblock_T *sb_next; /* next block in list */
char_u sb_data[1]; /* data, actually longer */
};
@@ -15011,7 +15014,7 @@ soundalike_score(goodstart, badstart)
case 0:
/*
- * Lenghts are equal, thus changes must result in same length: An
+ * Lengths are equal, thus changes must result in same length: An
* insert is only possible in combination with a delete.
* 1: check if for identical strings
*/
View
12 src/version.c
@@ -677,6 +677,18 @@ static char *(features[]) =
static int included_patches[] =
{ /* Add new patch number below this line */
/**/
+ 108,
+/**/
+ 107,
+/**/
+ 106,
+/**/
+ 105,
+/**/
+ 104,
+/**/
+ 103,
+/**/
102,
/**/
101,
Please sign in to comment.
Something went wrong with that request. Please try again.