Skip to content

Commit 4776f35

Browse files
authored
Merge branch 'macvim-dev:master' into patch-1
2 parents 46e8174 + 30f3dd4 commit 4776f35

29 files changed

+2614
-1415
lines changed

runtime/filetype.vim

Lines changed: 17 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -706,6 +706,9 @@ au BufNewFile,BufRead *.fsl setf framescript
706706
" FStab
707707
au BufNewFile,BufRead fstab,mtab setf fstab
708708

709+
" Func
710+
au BufNewFile,BufRead *.fc setf func
711+
709712
" Fusion
710713
au BufRead,BufNewFile *.fusion setf fusion
711714

@@ -862,7 +865,7 @@ au BufNewFile,BufRead *.htpp setf hastepreproc
862865
au BufRead,BufNewFile *.hcl setf hcl
863866

864867
" Go checksum file (must be before *.sum Hercules)
865-
au BufNewFile,BufRead go.sum setf gosum
868+
au BufNewFile,BufRead go.sum,go.work.sum setf gosum
866869

867870
" Hercules
868871
au BufNewFile,BufRead *.vc,*.ev,*.sum,*.errsum setf hercules
@@ -1264,6 +1267,9 @@ au BufNewFile,BufRead *.[mi][3g] setf modula3
12641267
" Larch/Modula-3
12651268
au BufNewFile,BufRead *.lm3 setf modula3
12661269

1270+
" Modconf
1271+
au BufNewFile,BufRead */etc/modules.conf,*/etc/modules,*/etc/conf.modules setf modconf
1272+
12671273
" Monk
12681274
au BufNewFile,BufRead *.isc,*.monk,*.ssc,*.tsc setf monk
12691275

@@ -1273,8 +1279,8 @@ au BufNewFile,BufRead *.moo setf moo
12731279
" Moonscript
12741280
au BufNewFile,BufRead *.moon setf moonscript
12751281

1276-
" Modconf
1277-
au BufNewFile,BufRead */etc/modules.conf,*/etc/modules,*/etc/conf.modules setf modconf
1282+
" Move language
1283+
au BufNewFile,BufRead *.move setf move
12781284

12791285
" MPD is based on XML
12801286
au BufNewFile,BufRead *.mpd setf xml
@@ -1717,12 +1723,15 @@ au BufNewFile,BufRead *.robot,*.resource setf robot
17171723
" Robots.txt
17181724
au BufNewFile,BufRead robots.txt setf robots
17191725

1720-
" Rpcgen
1721-
au BufNewFile,BufRead *.x setf rpcgen
1726+
" RON (Rusty Object Notation)
1727+
au BufNewFile,BufRead *.ron setf ron
17221728

17231729
" MikroTik RouterOS script
17241730
au BufRead,BufNewFile *.rsc setf routeros
17251731

1732+
" Rpcgen
1733+
au BufNewFile,BufRead *.x setf rpcgen
1734+
17261735
" reStructuredText Documentation Format
17271736
au BufNewFile,BufRead *.rst setf rst
17281737

@@ -1911,6 +1920,9 @@ au BufNewFile,BufRead *.sst.meta,*.-sst.meta,*._sst.meta setf sisu
19111920
" SKILL
19121921
au BufNewFile,BufRead *.il,*.ils,*.cdf setf skill
19131922

1923+
" Cadence
1924+
au BufNewFile,BufRead *.cdc setf cdc
1925+
19141926
" SLRN
19151927
au BufNewFile,BufRead .slrnrc setf slrnrc
19161928
au BufNewFile,BufRead *.score setf slrnsc

src/MacVim/scripts/cleanup-after-build

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -11,6 +11,7 @@ set -e
1111

1212
macvim_path=$1
1313

14+
sparkle_xpcservices_symlink="$macvim_path/Contents/Frameworks/Sparkle.framework/XPCServices"
1415
sparkle_xpcservices="$macvim_path/Contents/Frameworks/Sparkle.framework/Versions/Current/XPCServices"
1516

1617
if [ -d "$sparkle_xpcservices" ]; then
@@ -19,4 +20,5 @@ if [ -d "$sparkle_xpcservices" ]; then
1920
# otherwise. See https://sparkle-project.org/documentation/sandboxing/.
2021
set -x
2122
rm -rf "$sparkle_xpcservices"
23+
rm "$sparkle_xpcservices_symlink"
2224
fi

src/autocmd.c

Lines changed: 4 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1696,6 +1696,7 @@ aucmd_restbuf(
16961696
globaldir = aco->globaldir;
16971697

16981698
// the buffer contents may have changed
1699+
VIsual_active = aco->save_VIsual_active;
16991700
check_cursor();
17001701
if (curwin->w_topline > curbuf->b_ml.ml_line_count)
17011702
{
@@ -1742,14 +1743,16 @@ aucmd_restbuf(
17421743
curwin = save_curwin;
17431744
curbuf = curwin->w_buffer;
17441745
prevwin = win_find_by_id(aco->save_prevwin_id);
1746+
17451747
// In case the autocommand moves the cursor to a position that
17461748
// does not exist in curbuf.
1749+
VIsual_active = aco->save_VIsual_active;
17471750
check_cursor();
17481751
}
17491752
}
17501753

1751-
check_cursor(); // just in case lines got deleted
17521754
VIsual_active = aco->save_VIsual_active;
1755+
check_cursor(); // just in case lines got deleted
17531756
if (VIsual_active)
17541757
check_pos(curbuf, &VIsual);
17551758
}

src/change.c

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -611,7 +611,9 @@ changed_common(
611611
{
612612
if (wp->w_lines[i].wl_lnum >= lnum)
613613
{
614-
if (wp->w_lines[i].wl_lnum < lnume)
614+
// Do not change wl_lnum at index zero, it is used to
615+
// compare with w_topline. Invalidate it instead.
616+
if (wp->w_lines[i].wl_lnum < lnume || i == 0)
615617
{
616618
// line included in change
617619
wp->w_lines[i].wl_valid = FALSE;

src/charset.c

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -538,7 +538,7 @@ transchar_byte(int c)
538538

539539
/*
540540
* Convert non-printable character to two or more printable characters in
541-
* "buf[]". "charbuf" needs to be able to hold five bytes.
541+
* "charbuf[]". "charbuf" needs to be able to hold five bytes.
542542
* Does NOT work for multi-byte characters, c must be <= 255.
543543
*/
544544
void

src/ex_getln.c

Lines changed: 14 additions & 9 deletions
Original file line numberDiff line numberDiff line change
@@ -1183,6 +1183,7 @@ cmdline_insert_reg(int *gotesc UNUSED)
11831183
{
11841184
int i;
11851185
int c;
1186+
int literally = FALSE;
11861187
#ifdef FEAT_EVAL
11871188
int save_new_cmdpos = new_cmdpos;
11881189
#endif
@@ -1220,7 +1221,8 @@ cmdline_insert_reg(int *gotesc UNUSED)
12201221
#endif
12211222
if (c != ESC) // use ESC to cancel inserting register
12221223
{
1223-
cmdline_paste(c, i == Ctrl_R, FALSE);
1224+
literally = i == Ctrl_R;
1225+
cmdline_paste(c, literally, FALSE);
12241226

12251227
#ifdef FEAT_EVAL
12261228
// When there was a serious error abort getting the
@@ -1251,8 +1253,9 @@ cmdline_insert_reg(int *gotesc UNUSED)
12511253
// remove the double quote
12521254
redrawcmd();
12531255

1254-
// The text has been stuffed, the command line didn't change yet.
1255-
return CMDLINE_NOT_CHANGED;
1256+
// The text has been stuffed, the command line didn't change yet, but it
1257+
// will change soon. The caller must take care of it.
1258+
return literally ? CMDLINE_NOT_CHANGED : CMDLINE_CHANGED;
12561259
}
12571260

12581261
/*
@@ -2081,11 +2084,13 @@ getcmdline_int(
20812084

20822085
case Ctrl_R: // insert register
20832086
res = cmdline_insert_reg(&gotesc);
2084-
if (res == CMDLINE_NOT_CHANGED)
2085-
goto cmdline_not_changed;
2086-
else if (res == GOTO_NORMAL_MODE)
2087+
if (res == GOTO_NORMAL_MODE)
20872088
goto returncmd;
2088-
goto cmdline_changed;
2089+
#ifdef FEAT_SEARCH_EXTRA
2090+
if (res == CMDLINE_NOT_CHANGED)
2091+
is_state.incsearch_postponed = TRUE;
2092+
#endif
2093+
goto cmdline_not_changed;
20892094

20902095
case Ctrl_D:
20912096
if (showmatches(&xpc, FALSE) == EXPAND_NOTHING)
@@ -2302,7 +2307,7 @@ getcmdline_int(
23022307
wild_type = (c == Ctrl_P) ? WILD_PREV : WILD_NEXT;
23032308
if (nextwild(&xpc, wild_type, 0, firstc != '@') == FAIL)
23042309
break;
2305-
goto cmdline_not_changed;
2310+
goto cmdline_changed;
23062311
}
23072312
// FALLTHROUGH
23082313
case K_UP:
@@ -2324,7 +2329,7 @@ getcmdline_int(
23242329
wild_type = WILD_PAGEDOWN;
23252330
if (nextwild(&xpc, wild_type, 0, firstc != '@') == FAIL)
23262331
break;
2327-
goto cmdline_not_changed;
2332+
goto cmdline_changed;
23282333
}
23292334
else
23302335
{

src/feature.h

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -273,8 +273,8 @@
273273
#if defined(FEAT_NORMAL) \
274274
&& defined(FEAT_EVAL) \
275275
&& ((defined(HAVE_GETTIMEOFDAY) && defined(HAVE_SYS_TIME_H) \
276-
&& (!defined(MACOS_X) || defined(HAVE_DISPATCH_DISPATCH_H))) \
277-
|| defined(MSWIN))
276+
&& (!defined(MACOS_X) || defined(HAVE_DISPATCH_DISPATCH_H))) \
277+
|| defined(MSWIN))
278278
# define FEAT_RELTIME
279279
#endif
280280

src/getchar.c

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1662,7 +1662,7 @@ merge_modifyOtherKeys(int c_arg, int *modifiers)
16621662
&& c >= 0 && c <= 127)
16631663
{
16641664
c += 0x80;
1665-
*modifiers &= ~(MOD_MASK_META|MOD_MASK_ALT);
1665+
*modifiers &= ~(MOD_MASK_META | MOD_MASK_ALT);
16661666
}
16671667
return c;
16681668
}

0 commit comments

Comments
 (0)