mirror of
https://github.com/macvim-dev/macvim.git
synced 2026-06-07 15:37:14 +02:00
Merge branch 'vim'
This commit is contained in:
@@ -7,14 +7,15 @@ src/xxd/xxd
|
||||
src/auto/if_perl.c
|
||||
src/tags
|
||||
|
||||
# We do need src/auto/configure and src/auto/config.mk.
|
||||
src/auto/osdef.h
|
||||
# We do need src/auto/configure.
|
||||
src/auto/config.aap
|
||||
src/auto/config.cache
|
||||
src/auto/config.h
|
||||
src/auto/config.log
|
||||
src/auto/config.mk
|
||||
src/auto/config.status
|
||||
src/auto/configure.aap
|
||||
src/auto/osdef.h
|
||||
src/auto/link.log
|
||||
src/auto/link.sed
|
||||
src/auto/pathdef.c
|
||||
|
||||
@@ -23,6 +23,9 @@
|
||||
# has run can result in compiling with $(CC) empty.
|
||||
|
||||
first:
|
||||
@if test ! -f src/auto/config.mk; then \
|
||||
cp src/config.mk.dist src/auto/config.mk; \
|
||||
fi
|
||||
@echo "Starting make in the src directory."
|
||||
@echo "If there are problems, cd to the src directory and run make there"
|
||||
cd src && $(MAKE) $@
|
||||
@@ -30,6 +33,9 @@ first:
|
||||
# Some make programs use the last target for the $@ default; put the other
|
||||
# targets separately to always let $@ expand to "first" by default.
|
||||
all install uninstall tools config configure reconfig proto depend lint tags types test testclean clean distclean:
|
||||
@if test ! -f src/auto/config.mk; then \
|
||||
cp src/config.mk.dist src/auto/config.mk; \
|
||||
fi
|
||||
@echo "Starting make in the src directory."
|
||||
@echo "If there are problems, cd to the src directory and run make there"
|
||||
cd src && $(MAKE) $@
|
||||
|
||||
+5
-1
@@ -1159,6 +1159,10 @@ $(OUTDIR)/glbl_ime.obj: $(OUTDIR) glbl_ime.cpp dimm.h $(INCL)
|
||||
E0_CFLAGS = $(CFLAGS:\=\\)
|
||||
E_CFLAGS = $(E0_CFLAGS:"=\")
|
||||
# ") stop the string
|
||||
# $LINKARGS2 may contain backslashes and double quotes, escape them both.
|
||||
E0_LINKARGS2 = $(LINKARGS2:\=\\)
|
||||
E_LINKARGS2 = $(E0_LINKARGS2:"=\")
|
||||
# ") stop the string
|
||||
|
||||
$(PATHDEF_SRC): auto
|
||||
@echo creating $(PATHDEF_SRC)
|
||||
@@ -1167,7 +1171,7 @@ $(PATHDEF_SRC): auto
|
||||
@echo char_u *default_vim_dir = (char_u *)"$(VIMRCLOC:\=\\)"; >> $(PATHDEF_SRC)
|
||||
@echo char_u *default_vimruntime_dir = (char_u *)"$(VIMRUNTIMEDIR:\=\\)"; >> $(PATHDEF_SRC)
|
||||
@echo char_u *all_cflags = (char_u *)"$(CC:\=\\) $(E_CFLAGS)"; >> $(PATHDEF_SRC)
|
||||
@echo char_u *all_lflags = (char_u *)"$(link:\=\\) $(LINKARGS1:\=\\) $(LINKARGS2:\=\\)"; >> $(PATHDEF_SRC)
|
||||
@echo char_u *all_lflags = (char_u *)"$(link:\=\\) $(LINKARGS1:\=\\) $(E_LINKARGS2)"; >> $(PATHDEF_SRC)
|
||||
@echo char_u *compiled_user = (char_u *)"$(USERNAME)"; >> $(PATHDEF_SRC)
|
||||
@echo char_u *compiled_sys = (char_u *)"$(USERDOMAIN)"; >> $(PATHDEF_SRC)
|
||||
|
||||
|
||||
+6
-5
@@ -283,12 +283,13 @@ CC=
|
||||
|
||||
######################## auto/config.mk ######################## {{{1
|
||||
# At this position auto/config.mk is included. When starting from the
|
||||
# distribution it is almost empty. After running auto/configure it contains
|
||||
# settings that have been discovered for your system. Settings below this
|
||||
# include override settings in auto/config.mk!
|
||||
# toplevel Makefile it is almost empty. After running auto/configure it
|
||||
# contains settings that have been discovered for your system. Settings below
|
||||
# this include override settings in auto/config.mk!
|
||||
|
||||
# Note: if auto/config.mk is lost somehow (e.g., because configure was
|
||||
# interrupted), create an empty auto/config.mk file and do "make config".
|
||||
# Note: If make fails because auto/config.mk does not exist (it is not
|
||||
# included in the repository), do:
|
||||
# cp config.mk.dist auto/config.mk
|
||||
|
||||
# (X) How to include auto/config.mk depends on the version of "make" you have,
|
||||
# if the current choice doesn't work, try the other one.
|
||||
|
||||
@@ -3470,6 +3470,18 @@ build_stl_str_hl(wp, out, outlen, fmt, use_sandbox, fillchar,
|
||||
prevchar_isitem = FALSE;
|
||||
for (s = usefmt; *s; )
|
||||
{
|
||||
if (curitem == STL_MAX_ITEM)
|
||||
{
|
||||
/* There are too many items. Add the error code to the statusline
|
||||
* to give the user a hint about what went wrong. */
|
||||
if (p + 6 < out + outlen)
|
||||
{
|
||||
mch_memmove(p, " E541", (size_t)5);
|
||||
p += 5;
|
||||
}
|
||||
break;
|
||||
}
|
||||
|
||||
if (*s != NUL && *s != '%')
|
||||
prevchar_isflag = prevchar_isitem = FALSE;
|
||||
|
||||
|
||||
+13
-10
@@ -317,7 +317,7 @@ readfile(fname, sfname, from, lines_to_skip, lines_to_read, eap, flags)
|
||||
int using_b_fname;
|
||||
#endif
|
||||
|
||||
write_no_eol_lnum = 0; /* in case it was set by the previous read */
|
||||
curbuf->b_no_eol_lnum = 0; /* in case it was set by the previous read */
|
||||
|
||||
/*
|
||||
* If there is no file name yet, use the one for the read file.
|
||||
@@ -2599,10 +2599,11 @@ failed:
|
||||
|
||||
/*
|
||||
* Trick: We remember if the last line of the read didn't have
|
||||
* an eol for when writing it again. This is required for
|
||||
* an eol even when 'binary' is off, for when writing it again with
|
||||
* 'binary' on. This is required for
|
||||
* ":autocmd FileReadPost *.gz set bin|'[,']!gunzip" to work.
|
||||
*/
|
||||
write_no_eol_lnum = read_no_eol_lnum;
|
||||
curbuf->b_no_eol_lnum = read_no_eol_lnum;
|
||||
|
||||
/* When reloading a buffer put the cursor at the first line that is
|
||||
* different. */
|
||||
@@ -2650,13 +2651,17 @@ failed:
|
||||
FALSE, NULL, eap);
|
||||
if (msg_scrolled == n)
|
||||
msg_scroll = m;
|
||||
#ifdef FEAT_EVAL
|
||||
# ifdef FEAT_EVAL
|
||||
if (aborting()) /* autocmds may abort script processing */
|
||||
return FAIL;
|
||||
#endif
|
||||
# endif
|
||||
}
|
||||
#endif
|
||||
|
||||
/* Reset now, following writes should not omit the EOL. Also, the line
|
||||
* number will become invalid because of edits. */
|
||||
curbuf->b_no_eol_lnum = 0;
|
||||
|
||||
if (recoverymode && error)
|
||||
return FAIL;
|
||||
return OK;
|
||||
@@ -4560,7 +4565,7 @@ restore_backup:
|
||||
if (end == 0
|
||||
|| (lnum == end
|
||||
&& write_bin
|
||||
&& (lnum == write_no_eol_lnum
|
||||
&& (lnum == buf->b_no_eol_lnum
|
||||
|| (lnum == buf->b_ml.ml_line_count && !buf->b_p_eol))))
|
||||
{
|
||||
++lnum; /* written the line, count it */
|
||||
@@ -5086,8 +5091,6 @@ nofail:
|
||||
{
|
||||
aco_save_T aco;
|
||||
|
||||
write_no_eol_lnum = 0; /* in case it was set by the previous read */
|
||||
|
||||
/*
|
||||
* Apply POST autocommands.
|
||||
* Careful: The autocommands may call buf_write() recursively!
|
||||
@@ -7294,8 +7297,8 @@ buf_store_time(buf, st, fname)
|
||||
write_lnum_adjust(offset)
|
||||
linenr_T offset;
|
||||
{
|
||||
if (write_no_eol_lnum != 0) /* only if there is a missing eol */
|
||||
write_no_eol_lnum += offset;
|
||||
if (curbuf->b_no_eol_lnum != 0) /* only if there is a missing eol */
|
||||
curbuf->b_no_eol_lnum += offset;
|
||||
}
|
||||
|
||||
#if defined(TEMPDIRNAMES) || defined(PROTO)
|
||||
|
||||
@@ -1059,10 +1059,6 @@ EXTERN pos_T last_cursormoved /* for CursorMoved event */
|
||||
;
|
||||
#endif
|
||||
|
||||
EXTERN linenr_T write_no_eol_lnum INIT(= 0); /* non-zero lnum when last line
|
||||
of next binary write should
|
||||
not have an end-of-line */
|
||||
|
||||
#ifdef FEAT_WINDOWS
|
||||
EXTERN int postponed_split INIT(= 0); /* for CTRL-W CTRL-] command */
|
||||
EXTERN int postponed_split_flags INIT(= 0); /* args for win_split() */
|
||||
|
||||
+3
-1
@@ -1271,7 +1271,9 @@ main_loop(cmdwin, noexmode)
|
||||
|| conceal_cursor_line(curwin)
|
||||
|| need_cursor_line_redraw))
|
||||
{
|
||||
if (conceal_old_cursor_line != conceal_new_cursor_line)
|
||||
if (conceal_old_cursor_line != conceal_new_cursor_line
|
||||
&& conceal_old_cursor_line
|
||||
<= curbuf->b_ml.ml_line_count)
|
||||
update_single_line(curwin, conceal_old_cursor_line);
|
||||
update_single_line(curwin, conceal_new_cursor_line);
|
||||
curwin->w_valid &= ~VALID_CROW;
|
||||
|
||||
+3
-3
@@ -4071,9 +4071,9 @@ attention_message(buf, fname)
|
||||
}
|
||||
/* Some of these messages are long to allow translation to
|
||||
* other languages. */
|
||||
MSG_PUTS(_("\n(1) Another program may be editing the same file.\n If this is the case, be careful not to end up with two\n different instances of the same file when making changes.\n"));
|
||||
MSG_PUTS(_(" Quit, or continue with caution.\n"));
|
||||
MSG_PUTS(_("\n(2) An edit session for this file crashed.\n"));
|
||||
MSG_PUTS(_("\n(1) Another program may be editing the same file. If this is the case,\n be careful not to end up with two different instances of the same\n file when making changes."));
|
||||
MSG_PUTS(_(" Quit, or continue with caution.\n"));
|
||||
MSG_PUTS(_("(2) An edit session for this file crashed.\n"));
|
||||
MSG_PUTS(_(" If this is the case, use \":recover\" or \"vim -r "));
|
||||
msg_outtrans(buf->b_fname);
|
||||
MSG_PUTS(_("\"\n to recover the changes (see \":help recovery\").\n"));
|
||||
|
||||
+3
-3
@@ -4263,7 +4263,7 @@ mch_call_shell(cmd, options)
|
||||
* should not have one. */
|
||||
if (lnum != curbuf->b_op_end.lnum
|
||||
|| !curbuf->b_p_bin
|
||||
|| (lnum != write_no_eol_lnum
|
||||
|| (lnum != curbuf->b_no_eol_lnum
|
||||
&& (lnum !=
|
||||
curbuf->b_ml.ml_line_count
|
||||
|| curbuf->b_p_eol)))
|
||||
@@ -4610,10 +4610,10 @@ finished:
|
||||
{
|
||||
append_ga_line(&ga);
|
||||
/* remember that the NL was missing */
|
||||
write_no_eol_lnum = curwin->w_cursor.lnum;
|
||||
curbuf->b_no_eol_lnum = curwin->w_cursor.lnum;
|
||||
}
|
||||
else
|
||||
write_no_eol_lnum = 0;
|
||||
curbuf->b_no_eol_lnum = 0;
|
||||
ga_clear(&ga);
|
||||
}
|
||||
|
||||
|
||||
@@ -1567,6 +1567,9 @@ struct file_buffer
|
||||
|
||||
/* end of buffer options */
|
||||
|
||||
linenr_T b_no_eol_lnum; /* non-zero lnum when last line of next binary
|
||||
* write should not have an end-of-line */
|
||||
|
||||
int b_start_eol; /* last line had eol when it was read */
|
||||
int b_start_ffc; /* first char of 'ff' when edit started */
|
||||
#ifdef FEAT_MBYTE
|
||||
|
||||
@@ -729,6 +729,18 @@ static char *(features[]) =
|
||||
|
||||
static int included_patches[] =
|
||||
{ /* Add new patch number below this line */
|
||||
/**/
|
||||
125,
|
||||
/**/
|
||||
124,
|
||||
/**/
|
||||
123,
|
||||
/**/
|
||||
122,
|
||||
/**/
|
||||
121,
|
||||
/**/
|
||||
120,
|
||||
/**/
|
||||
119,
|
||||
/**/
|
||||
|
||||
Reference in New Issue
Block a user