-
# runtime/doc/eval.txt | 4 +--
# runtime/doc/options.txt | 42 ++++++++++++++++++++++++++++++++----
# runtime/doc/tags | 6 +++++
# runtime/optwin.vim | 9 +++++++
# src/charset.c | 56 ++++++++++++++++++++++++++++++------------------
# src/edit.c | 21 +++++++++---------
# src/eval.c | 7 ++++--
# src/ex_cmds.c | 2 -
# src/getchar.c | 2 -
# src/gui_beval.c | 2 -
# src/misc1.c | 54 +++++++++++++++++++++++++++++++++++++++-------
# src/misc2.c | 8 +++---
# src/normal.c | 6 ++---
# src/ops.c | 16 ++++++-------
# src/option.c | 47 ++++++++++++++++++++++++++++++++++++++++
# src/option.h | 5 ++++
# src/proto/charset.pro | 12 +++++-----
# src/proto/misc1.pro | 1
# src/regexp.c | 4 +--
# src/regexp_nfa.c | 2 -
# src/screen.c | 37 ++++++++++++++++++++++++++++---
# src/structs.h | 8 ++++++
# src/ui.c | 2 -
# 23 files changed, 275 insertions(+), 78 deletions(-)
diff -urN '--exclude=*.orig' '--exclude=*.rej' vim74.orig/runtime/doc/eval.txt vim74/runtime/doc/eval.txt
|
old
|
new
|
|
| 6407 | 6407 | keymap Compiled with 'keymap' support. |
| 6408 | 6408 | langmap Compiled with 'langmap' support. |
| 6409 | 6409 | libcall Compiled with |libcall()| support. |
| 6410 | | linebreak Compiled with 'linebreak', 'breakat' and 'showbreak' |
| 6411 | | support. |
| | 6410 | linebreak Compiled with 'linebreak', 'breakat', 'showbreak' and |
| | 6411 | 'breakindent' support. |
| 6412 | 6412 | lispindent Compiled with support for lisp indenting. |
| 6413 | 6413 | listcmds Compiled with commands for the buffer list |:files| |
| 6414 | 6414 | and the argument list |arglist|. |
-
diff -urN '--exclude=*.orig' '--exclude=*.rej' vim74.orig/runtime/doc/options.txt vim74/runtime/doc/options.txt
|
old
|
new
|
|
| 1200 | 1200 | break if 'linebreak' is on. Only works for ASCII and also for 8-bit |
| 1201 | 1201 | characters when 'encoding' is an 8-bit encoding. |
| 1202 | 1202 | |
| | 1203 | |
| | 1204 | *'breakindent'* *'bri'* |
| | 1205 | 'breakindent' 'bri' boolean (default off) |
| | 1206 | local to window |
| | 1207 | {not in Vi} |
| | 1208 | {not available when compiled without the |+linebreak| |
| | 1209 | feature} |
| | 1210 | Every wrapped line will continue visually indented (same amount of |
| | 1211 | space as the beginning of that line), thus preserving horizontal blocks |
| | 1212 | of text. |
| | 1213 | |
| | 1214 | *'breakindentmin'* *'brimin'* |
| | 1215 | 'breakindentmin' 'brimin' number (default 20) |
| | 1216 | local to window |
| | 1217 | {not in Vi} |
| | 1218 | {not available when compiled without the |+linebreak| |
| | 1219 | feature} |
| | 1220 | Minimum text width that will be kept after applying 'breakindent', |
| | 1221 | even if the resulting text should normally be narrower. This prevents |
| | 1222 | text indented almost to the right window border oocupying lot of |
| | 1223 | vertical space when broken. |
| | 1224 | |
| | 1225 | *'breakindentshift'* *'brishift'* |
| | 1226 | 'breakindentshift' 'brishift' number (default 20) |
| | 1227 | local to window |
| | 1228 | {not in Vi} |
| | 1229 | {not available when compiled without the |+linebreak| |
| | 1230 | feature} |
| | 1231 | After applying 'breakindent', wrapped line beginning will be shift by |
| | 1232 | given number of characters. It permits dynamic French paragraph |
| | 1233 | indentation (negative) or emphasizing the line continuation |
| | 1234 | (positive). |
| | 1235 | |
| 1203 | 1236 | *'browsedir'* *'bsdir'* |
| 1204 | 1237 | 'browsedir' 'bsdir' string (default: "last") |
| 1205 | 1238 | global |
| … |
… |
|
| 4572 | 4605 | {not in Vi} |
| 4573 | 4606 | {not available when compiled without the |+linebreak| |
| 4574 | 4607 | feature} |
| 4575 | | If on Vim will wrap long lines at a character in 'breakat' rather |
| | 4608 | If on, Vim will wrap long lines at a character in 'breakat' rather |
| 4576 | 4609 | than at the last character that fits on the screen. Unlike |
| 4577 | 4610 | 'wrapmargin' and 'textwidth', this does not insert <EOL>s in the file, |
| 4578 | | it only affects the way the file is displayed, not its contents. The |
| 4579 | | value of 'showbreak' is used to put in front of wrapped lines. |
| 4580 | | This option is not used when the 'wrap' option is off or 'list' is on. |
| | 4611 | it only affects the way the file is displayed, not its contents. |
| | 4612 | If 'breakindent' is set, line is visually indented. Then, the value |
| | 4613 | of 'showbreak' is used to put in front of wrapped lines. This option |
| | 4614 | is not used when the 'wrap' option is off or 'list' is on. |
| 4581 | 4615 | Note that <Tab> characters after an <EOL> are mostly not displayed |
| 4582 | 4616 | with the right amount of white space. |
| 4583 | 4617 | |
-
diff -urN '--exclude=*.orig' '--exclude=*.rej' vim74.orig/runtime/doc/tags vim74/runtime/doc/tags
|
old
|
new
|
|
| 90 | 90 | 'bl' options.txt /*'bl'* |
| 91 | 91 | 'bomb' options.txt /*'bomb'* |
| 92 | 92 | 'breakat' options.txt /*'breakat'* |
| | 93 | 'breakindent' options.txt /*'breakindent'* |
| | 94 | 'breakindentmin' options.txt /*'breakindentmin'* |
| | 95 | 'breakindentshift' options.txt /*'breakindentshift'* |
| | 96 | 'bri' options.txt /*'bri'* |
| | 97 | 'brimin' options.txt /*'brimin'* |
| | 98 | 'brishift' options.txt /*'brishift'* |
| 93 | 99 | 'brk' options.txt /*'brk'* |
| 94 | 100 | 'browsedir' options.txt /*'browsedir'* |
| 95 | 101 | 'bs' options.txt /*'bs'* |
-
diff -urN '--exclude=*.orig' '--exclude=*.rej' vim74.orig/runtime/optwin.vim vim74/runtime/optwin.vim
|
old
|
new
|
|
| 324 | 324 | call append("$", "linebreak\twrap long lines at a character in 'breakat'") |
| 325 | 325 | call append("$", "\t(local to window)") |
| 326 | 326 | call <SID>BinOptionL("lbr") |
| | 327 | call append("$", "breakindent\tpreserve indentation in wrapped text") |
| | 328 | call append("$", "\t(local to window)") |
| | 329 | call <SID>BinOptionL("bri") |
| | 330 | call append("$", "breakindentmin\tminimum text width after indent in 'breakindent'") |
| | 331 | call append("$", "\t(local to window)") |
| | 332 | call <SID>OptionL("brimin") |
| | 333 | call append("$", "breakindentshift\tshift beginning of 'breakindent'ed line by this number of characters (negative left)") |
| | 334 | call append("$", "\t(local to window)") |
| | 335 | call <SID>OptionL("brishift") |
| 327 | 336 | call append("$", "breakat\twhich characters might cause a line break") |
| 328 | 337 | call <SID>OptionG("brk", &brk) |
| 329 | 338 | call append("$", "showbreak\tstring to put before wrapped screen lines") |
-
diff -urN '--exclude=*.orig' '--exclude=*.rej' vim74.orig/src/charset.c vim74/src/charset.c
|
old
|
new
|
|
| 852 | 852 | * taking into account the size of a tab. |
| 853 | 853 | */ |
| 854 | 854 | int |
| 855 | | linetabsize(s) |
| | 855 | linetabsize(s, lnum) |
| 856 | 856 | char_u *s; |
| | 857 | linenr_T lnum; |
| 857 | 858 | { |
| 858 | | return linetabsize_col(0, s); |
| | 859 | return linetabsize_col(0, s, lnum); |
| 859 | 860 | } |
| 860 | 861 | |
| 861 | 862 | /* |
| 862 | 863 | * Like linetabsize(), but starting at column "startcol". |
| 863 | 864 | */ |
| 864 | 865 | int |
| 865 | | linetabsize_col(startcol, s) |
| | 866 | linetabsize_col(startcol, s, lnum) |
| 866 | 867 | int startcol; |
| 867 | 868 | char_u *s; |
| | 869 | linenr_T lnum; |
| 868 | 870 | { |
| 869 | 871 | colnr_T col = startcol; |
| 870 | 872 | |
| 871 | 873 | while (*s != NUL) |
| 872 | | col += lbr_chartabsize_adv(&s, col); |
| | 874 | col += lbr_chartabsize_adv(&s, col, lnum); |
| 873 | 875 | return (int)col; |
| 874 | 876 | } |
| 875 | 877 | |
| … |
… |
|
| 877 | 879 | * Like linetabsize(), but for a given window instead of the current one. |
| 878 | 880 | */ |
| 879 | 881 | int |
| 880 | | win_linetabsize(wp, p, len) |
| | 882 | win_linetabsize(wp, p, len, lnum) |
| 881 | 883 | win_T *wp; |
| 882 | 884 | char_u *p; |
| 883 | 885 | colnr_T len; |
| | 886 | linenr_T lnum; |
| 884 | 887 | { |
| 885 | 888 | colnr_T col = 0; |
| 886 | 889 | char_u *s; |
| 887 | 890 | |
| 888 | 891 | for (s = p; *s != NUL && (len == MAXCOL || s < p + len); mb_ptr_adv(s)) |
| 889 | | col += win_lbr_chartabsize(wp, s, col, NULL); |
| | 892 | col += win_lbr_chartabsize(wp, s, col, NULL, lnum); |
| 890 | 893 | return (int)col; |
| 891 | 894 | } |
| 892 | 895 | |
| … |
… |
|
| 1021 | 1024 | * like chartabsize(), but also check for line breaks on the screen |
| 1022 | 1025 | */ |
| 1023 | 1026 | int |
| 1024 | | lbr_chartabsize(s, col) |
| | 1027 | lbr_chartabsize(s, col, lnum) |
| 1025 | 1028 | unsigned char *s; |
| 1026 | 1029 | colnr_T col; |
| | 1030 | linenr_T lnum; |
| 1027 | 1031 | { |
| 1028 | 1032 | #ifdef FEAT_LINEBREAK |
| 1029 | | if (!curwin->w_p_lbr && *p_sbr == NUL) |
| | 1033 | if (!curwin->w_p_lbr && *p_sbr == NUL && !curwin->w_p_bri) |
| 1030 | 1034 | { |
| 1031 | 1035 | #endif |
| 1032 | 1036 | #ifdef FEAT_MBYTE |
| … |
… |
|
| 1036 | 1040 | RET_WIN_BUF_CHARTABSIZE(curwin, curbuf, s, col) |
| 1037 | 1041 | #ifdef FEAT_LINEBREAK |
| 1038 | 1042 | } |
| 1039 | | return win_lbr_chartabsize(curwin, s, col, NULL); |
| | 1043 | return win_lbr_chartabsize(curwin, s, col, NULL, lnum); |
| 1040 | 1044 | #endif |
| 1041 | 1045 | } |
| 1042 | 1046 | |
| … |
… |
|
| 1044 | 1048 | * Call lbr_chartabsize() and advance the pointer. |
| 1045 | 1049 | */ |
| 1046 | 1050 | int |
| 1047 | | lbr_chartabsize_adv(s, col) |
| | 1051 | lbr_chartabsize_adv(s, col, lnum) |
| 1048 | 1052 | char_u **s; |
| 1049 | 1053 | colnr_T col; |
| | 1054 | linenr_T lnum; |
| 1050 | 1055 | { |
| 1051 | 1056 | int retval; |
| 1052 | 1057 | |
| 1053 | | retval = lbr_chartabsize(*s, col); |
| | 1058 | retval = lbr_chartabsize(*s, col, lnum); |
| 1054 | 1059 | mb_ptr_adv(*s); |
| 1055 | 1060 | return retval; |
| 1056 | 1061 | } |
| … |
… |
|
| 1061 | 1066 | * If "headp" not NULL, set *headp to the size of what we for 'showbreak' |
| 1062 | 1067 | * string at start of line. Warning: *headp is only set if it's a non-zero |
| 1063 | 1068 | * value, init to 0 before calling. |
| | 1069 | * |
| | 1070 | * linenr argument needed if in visual highlighting and breakindent=on, then |
| | 1071 | * the line calculated is not current; if 0, normal functionality is preserved. |
| 1064 | 1072 | */ |
| 1065 | 1073 | int |
| 1066 | | win_lbr_chartabsize(wp, s, col, headp) |
| | 1074 | win_lbr_chartabsize(wp, s, col, headp, lnum) |
| 1067 | 1075 | win_T *wp; |
| 1068 | 1076 | char_u *s; |
| 1069 | 1077 | colnr_T col; |
| 1070 | 1078 | int *headp UNUSED; |
| | 1079 | linenr_T lnum; |
| 1071 | 1080 | { |
| 1072 | 1081 | #ifdef FEAT_LINEBREAK |
| 1073 | 1082 | int c; |
| … |
… |
|
| 1086 | 1095 | int n; |
| 1087 | 1096 | |
| 1088 | 1097 | /* |
| 1089 | | * No 'linebreak' and 'showbreak': return quickly. |
| | 1098 | * No 'linebreak' and 'showbreak' and 'breakindent': return quickly. |
| 1090 | 1099 | */ |
| 1091 | | if (!wp->w_p_lbr && *p_sbr == NUL) |
| | 1100 | if (!wp->w_p_lbr && !wp->w_p_bri && *p_sbr == NUL) |
| 1092 | 1101 | #endif |
| 1093 | 1102 | { |
| 1094 | 1103 | #ifdef FEAT_MBYTE |
| … |
… |
|
| 1163 | 1172 | # endif |
| 1164 | 1173 | |
| 1165 | 1174 | /* |
| 1166 | | * May have to add something for 'showbreak' string at start of line |
| | 1175 | * May have to add something for 'breakindent' and/or 'showbreak' |
| | 1176 | * string at start of line. |
| 1167 | 1177 | * Set *headp to the size of what we add. |
| 1168 | 1178 | */ |
| 1169 | 1179 | added = 0; |
| 1170 | | if (*p_sbr != NUL && wp->w_p_wrap && col != 0) |
| | 1180 | if ((*p_sbr != NUL || wp->w_p_bri) && wp->w_p_wrap && col != 0) |
| 1171 | 1181 | { |
| 1172 | 1182 | numberextra = win_col_off(wp); |
| 1173 | 1183 | col += numberextra + mb_added; |
| … |
… |
|
| 1180 | 1190 | } |
| 1181 | 1191 | if (col == 0 || col + size > (colnr_T)W_WIDTH(wp)) |
| 1182 | 1192 | { |
| 1183 | | added = vim_strsize(p_sbr); |
| | 1193 | added = 0; |
| | 1194 | if (*p_sbr != NUL) |
| | 1195 | added += vim_strsize(p_sbr); |
| | 1196 | if (wp->w_p_bri) |
| | 1197 | added += get_breakindent_win(wp,lnum); |
| | 1198 | |
| 1184 | 1199 | if (tab_corr) |
| 1185 | 1200 | size += (added / wp->w_buffer->b_p_ts) * wp->w_buffer->b_p_ts; |
| 1186 | 1201 | else |
| … |
… |
|
| 1288 | 1303 | |
| 1289 | 1304 | /* |
| 1290 | 1305 | * This function is used very often, do some speed optimizations. |
| 1291 | | * When 'list', 'linebreak' and 'showbreak' are not set use a simple loop. |
| | 1306 | * When 'list', 'linebreak', 'showbreak' and 'breakindent' are not set |
| | 1307 | * use a simple loop. |
| 1292 | 1308 | * Also use this when 'list' is set but tabs take their normal size. |
| 1293 | 1309 | */ |
| 1294 | 1310 | if ((!wp->w_p_list || lcs_tab1 != NUL) |
| 1295 | 1311 | #ifdef FEAT_LINEBREAK |
| 1296 | | && !wp->w_p_lbr && *p_sbr == NUL |
| | 1312 | && !wp->w_p_lbr && *p_sbr == NUL && !wp->w_p_bri |
| 1297 | 1313 | #endif |
| 1298 | 1314 | ) |
| 1299 | 1315 | { |
| … |
… |
|
| 1355 | 1371 | { |
| 1356 | 1372 | /* A tab gets expanded, depending on the current column */ |
| 1357 | 1373 | head = 0; |
| 1358 | | incr = win_lbr_chartabsize(wp, ptr, vcol, &head); |
| | 1374 | incr = win_lbr_chartabsize(wp, ptr, vcol, &head, pos->lnum); |
| 1359 | 1375 | /* make sure we don't go past the end of the line */ |
| 1360 | 1376 | if (*ptr == NUL) |
| 1361 | 1377 | { |
-
diff -urN '--exclude=*.orig' '--exclude=*.rej' vim74.orig/src/edit.c vim74/src/edit.c
|
old
|
new
|
|
| 428 | 428 | if (startln) |
| 429 | 429 | Insstart.col = 0; |
| 430 | 430 | } |
| 431 | | Insstart_textlen = (colnr_T)linetabsize(ml_get_curline()); |
| | 431 | Insstart_textlen = (colnr_T)linetabsize(ml_get_curline(), Insstart.lnum); |
| 432 | 432 | Insstart_blank_vcol = MAXCOL; |
| 433 | 433 | if (!did_ai) |
| 434 | 434 | ai_col = 0; |
| … |
… |
|
| 1951 | 1951 | else |
| 1952 | 1952 | #endif |
| 1953 | 1953 | ++new_cursor_col; |
| 1954 | | vcol += lbr_chartabsize(ptr + new_cursor_col, (colnr_T)vcol); |
| | 1954 | vcol += lbr_chartabsize(ptr + new_cursor_col, (colnr_T)vcol, curwin->w_cursor.lnum); |
| 1955 | 1955 | } |
| 1956 | 1956 | vcol = last_vcol; |
| 1957 | 1957 | |
| … |
… |
|
| 6743 | 6743 | ins_need_undo = FALSE; |
| 6744 | 6744 | } |
| 6745 | 6745 | Insstart = curwin->w_cursor; /* new insertion starts here */ |
| 6746 | | Insstart_textlen = (colnr_T)linetabsize(ml_get_curline()); |
| | 6746 | Insstart_textlen = (colnr_T)linetabsize(ml_get_curline(), curwin->w_cursor.lnum); |
| 6747 | 6747 | ai_col = 0; |
| 6748 | 6748 | #ifdef FEAT_VREPLACE |
| 6749 | 6749 | if (State & VREPLACE_FLAG) |
| … |
… |
|
| 7098 | 7098 | for (;;) |
| 7099 | 7099 | { |
| 7100 | 7100 | coladvance(v - width); |
| 7101 | | /* getviscol() is slow, skip it when 'showbreak' is empty and |
| 7102 | | * there are no multi-byte characters */ |
| 7103 | | if ((*p_sbr == NUL |
| | 7101 | /* getviscol() is slow, skip it when 'showbreak' is empty, |
| | 7102 | * 'breakindent' is not set and there are no multi-byte |
| | 7103 | * characters */ |
| | 7104 | if ((*p_sbr == NUL && !curwin->w_p_bri |
| 7104 | 7105 | # ifdef FEAT_MBYTE |
| 7105 | 7106 | && !has_mbyte |
| 7106 | 7107 | # endif |
| … |
… |
|
| 9740 | 9741 | getvcol(curwin, &fpos, &vcol, NULL, NULL); |
| 9741 | 9742 | getvcol(curwin, cursor, &want_vcol, NULL, NULL); |
| 9742 | 9743 | |
| 9743 | | /* Use as many TABs as possible. Beware of 'showbreak' and |
| | 9744 | /* Use as many TABs as possible. Beware of 'breakindent', 'showbreak' and |
| 9744 | 9745 | * 'linebreak' adding extra virtual columns. */ |
| 9745 | 9746 | while (vim_iswhite(*ptr)) |
| 9746 | 9747 | { |
| 9747 | | i = lbr_chartabsize((char_u *)"\t", vcol); |
| | 9748 | i = lbr_chartabsize((char_u *)"\t", vcol, cursor->lnum); |
| 9748 | 9749 | if (vcol + i > want_vcol) |
| 9749 | 9750 | break; |
| 9750 | 9751 | if (*ptr != TAB) |
| … |
… |
|
| 9770 | 9771 | /* Skip over the spaces we need. */ |
| 9771 | 9772 | while (vcol < want_vcol && *ptr == ' ') |
| 9772 | 9773 | { |
| 9773 | | vcol += lbr_chartabsize(ptr, vcol); |
| | 9774 | vcol += lbr_chartabsize(ptr, vcol, cursor->lnum); |
| 9774 | 9775 | ++ptr; |
| 9775 | 9776 | ++repl_off; |
| 9776 | 9777 | } |
| … |
… |
|
| 10026 | 10027 | while ((colnr_T)temp < curwin->w_virtcol && *ptr != NUL) |
| 10027 | 10028 | { |
| 10028 | 10029 | prev_ptr = ptr; |
| 10029 | | temp += lbr_chartabsize_adv(&ptr, (colnr_T)temp); |
| | 10030 | temp += lbr_chartabsize_adv(&ptr, (colnr_T)temp, lnum); |
| 10030 | 10031 | } |
| 10031 | 10032 | if ((colnr_T)temp > curwin->w_virtcol) |
| 10032 | 10033 | ptr = prev_ptr; |
-
diff -urN '--exclude=*.orig' '--exclude=*.rej' vim74.orig/src/eval.c vim74/src/eval.c
|
old
|
new
|
|
| 17582 | 17582 | |
| 17583 | 17583 | if (argvars[1].v_type != VAR_UNKNOWN) |
| 17584 | 17584 | col = get_tv_number(&argvars[1]); |
| 17585 | | |
| 17586 | | rettv->vval.v_number = (varnumber_T)(linetabsize_col(col, s) - col); |
| | 17585 | /* |
| | 17586 | * FIXME: passing 0 as 3rd argument to linetabsize_col, instead of real line number; |
| | 17587 | * (can we get it from here somehow?); might give incorrect result with breakindent! |
| | 17588 | */ |
| | 17589 | rettv->vval.v_number = (varnumber_T)(linetabsize_col(col, s, 0) - col); |
| 17587 | 17590 | } |
| 17588 | 17591 | |
| 17589 | 17592 | /* |
-
diff -urN '--exclude=*.orig' '--exclude=*.rej' vim74.orig/src/ex_cmds.c vim74/src/ex_cmds.c
|
old
|
new
|
|
| 261 | 261 | ; |
| 262 | 262 | save = *last; |
| 263 | 263 | *last = NUL; |
| 264 | | len = linetabsize(line); /* get line length */ |
| | 264 | len = linetabsize(line, curwin->w_cursor.lnum); /* get line length */ |
| 265 | 265 | if (has_tab != NULL) /* check for embedded TAB */ |
| 266 | 266 | *has_tab = (vim_strrchr(first, TAB) != NULL); |
| 267 | 267 | *last = save; |
-
diff -urN '--exclude=*.orig' '--exclude=*.rej' vim74.orig/src/getchar.c vim74/src/getchar.c
|
old
|
new
|
|
| 2633 | 2633 | if (!vim_iswhite(ptr[col])) |
| 2634 | 2634 | curwin->w_wcol = vcol; |
| 2635 | 2635 | vcol += lbr_chartabsize(ptr + col, |
| 2636 | | (colnr_T)vcol); |
| | 2636 | (colnr_T)vcol, curwin->w_cursor.lnum); |
| 2637 | 2637 | #ifdef FEAT_MBYTE |
| 2638 | 2638 | if (has_mbyte) |
| 2639 | 2639 | col += (*mb_ptr2len)(ptr + col); |
-
diff -urN '--exclude=*.orig' '--exclude=*.rej' vim74.orig/src/gui_beval.c vim74/src/gui_beval.c
|
old
|
new
|
|
| 335 | 335 | { |
| 336 | 336 | /* Not past end of the file. */ |
| 337 | 337 | lbuf = ml_get_buf(wp->w_buffer, lnum, FALSE); |
| 338 | | if (col <= win_linetabsize(wp, lbuf, (colnr_T)MAXCOL)) |
| | 338 | if (col <= win_linetabsize(wp, lbuf, (colnr_T)MAXCOL, lnum)) |
| 339 | 339 | { |
| 340 | 340 | /* Not past end of line. */ |
| 341 | 341 | if (getword) |
-
diff -urN '--exclude=*.orig' '--exclude=*.rej' vim74.orig/src/misc1.c vim74/src/misc1.c
|
old
|
new
|
|
| 468 | 468 | return (int)col; |
| 469 | 469 | } |
| 470 | 470 | |
| | 471 | #ifdef FEAT_LINEBREAK |
| | 472 | /* |
| | 473 | * Return appropriate space number for breakindent, taking influencing |
| | 474 | * parameters into account. Window must be specified, since it is not |
| | 475 | * necessarily always the current one. If lnum==0, current line is calculated, |
| | 476 | * specified line otherwise. |
| | 477 | */ |
| | 478 | int |
| | 479 | get_breakindent_win (wp,lnum) |
| | 480 | win_T* wp; |
| | 481 | linenr_T lnum; |
| | 482 | { |
| | 483 | int bri; |
| | 484 | /* window width minus barren space, i.e. what rests for text */ |
| | 485 | const int eff_wwidth = W_WIDTH(wp) |
| | 486 | - (wp->w_p_nu && !vim_strchr(p_cpo,CPO_NUMCOL)?number_width(wp):0); |
| | 487 | /* - (*p_sbr == NUL ? 0 : vim_strsize(p_sbr)); */ |
| | 488 | |
| | 489 | bri = get_indent_buf(wp->w_buffer,lnum?lnum:wp->w_cursor.lnum) + wp->w_p_brishift; |
| | 490 | |
| | 491 | /* if numbering and 'c' in 'cpoptions', cancel it out effectively */ |
| | 492 | /* (this could be replaced by an equivalent call to win_col_off2()) */ |
| | 493 | if (curwin->w_p_nu && vim_strchr(p_cpo, CPO_NUMCOL)) |
| | 494 | bri += number_width(wp); |
| | 495 | |
| | 496 | /* never indent past left window margin */ |
| | 497 | if (bri < 0) |
| | 498 | bri = 0; |
| | 499 | /* always leave at least bri_min characters on the left, |
| | 500 | * if text width is sufficient */ |
| | 501 | else if (bri > eff_wwidth - wp->w_p_brimin) |
| | 502 | bri = eff_wwidth - wp->w_p_brimin < 0 ? 0 : eff_wwidth - wp->w_p_brimin; |
| | 503 | |
| | 504 | return bri; |
| | 505 | } |
| | 506 | #endif |
| | 507 | |
| | 508 | |
| 471 | 509 | #if defined(FEAT_CINDENT) || defined(FEAT_SMARTINDENT) |
| 472 | 510 | |
| 473 | 511 | static int cin_is_cinword __ARGS((char_u *line)); |
| … |
… |
|
| 1950 | 1988 | s = ml_get_buf(wp->w_buffer, lnum, FALSE); |
| 1951 | 1989 | if (*s == NUL) /* empty line */ |
| 1952 | 1990 | return 1; |
| 1953 | | col = win_linetabsize(wp, s, (colnr_T)MAXCOL); |
| | 1991 | col = win_linetabsize(wp, s, (colnr_T)MAXCOL, lnum); |
| 1954 | 1992 | |
| 1955 | 1993 | /* |
| 1956 | 1994 | * If list mode is on, then the '$' at the end of the line may take up one |
| … |
… |
|
| 2006 | 2044 | col = 0; |
| 2007 | 2045 | while (*s != NUL && --column >= 0) |
| 2008 | 2046 | { |
| 2009 | | col += win_lbr_chartabsize(wp, s, (colnr_T)col, NULL); |
| | 2047 | col += win_lbr_chartabsize(wp, s, (colnr_T)col, NULL, lnum); |
| 2010 | 2048 | mb_ptr_adv(s); |
| 2011 | 2049 | } |
| 2012 | 2050 | |
| … |
… |
|
| 2018 | 2056 | * 'ts') -- webb. |
| 2019 | 2057 | */ |
| 2020 | 2058 | if (*s == TAB && (State & NORMAL) && (!wp->w_p_list || lcs_tab1)) |
| 2021 | | col += win_lbr_chartabsize(wp, s, (colnr_T)col, NULL) - 1; |
| | 2059 | col += win_lbr_chartabsize(wp, s, (colnr_T)col, NULL, lnum) - 1; |
| 2022 | 2060 | |
| 2023 | 2061 | /* |
| 2024 | 2062 | * Add column offset for 'number', 'relativenumber', 'foldcolumn', etc. |
| … |
… |
|
| 9049 | 9087 | amount = 0; |
| 9050 | 9088 | while (*that && col) |
| 9051 | 9089 | { |
| 9052 | | amount += lbr_chartabsize_adv(&that, (colnr_T)amount); |
| | 9090 | amount += lbr_chartabsize_adv(&that, (colnr_T)amount, pos->lnum); |
| 9053 | 9091 | col--; |
| 9054 | 9092 | } |
| 9055 | 9093 | |
| … |
… |
|
| 9072 | 9110 | |
| 9073 | 9111 | while (vim_iswhite(*that)) |
| 9074 | 9112 | { |
| 9075 | | amount += lbr_chartabsize(that, (colnr_T)amount); |
| | 9113 | amount += lbr_chartabsize(that, (colnr_T)amount, pos->lnum); |
| 9076 | 9114 | ++that; |
| 9077 | 9115 | } |
| 9078 | 9116 | |
| … |
… |
|
| 9111 | 9149 | --parencount; |
| 9112 | 9150 | if (*that == '\\' && *(that+1) != NUL) |
| 9113 | 9151 | amount += lbr_chartabsize_adv(&that, |
| 9114 | | (colnr_T)amount); |
| | 9152 | (colnr_T)amount, pos->lnum); |
| 9115 | 9153 | amount += lbr_chartabsize_adv(&that, |
| 9116 | | (colnr_T)amount); |
| | 9154 | (colnr_T)amount, pos->lnum); |
| 9117 | 9155 | } |
| 9118 | 9156 | } |
| 9119 | 9157 | while (vim_iswhite(*that)) |
| 9120 | 9158 | { |
| 9121 | | amount += lbr_chartabsize(that, (colnr_T)amount); |
| | 9159 | amount += lbr_chartabsize(that, (colnr_T)amount, pos->lnum); |
| 9122 | 9160 | that++; |
| 9123 | 9161 | } |
| 9124 | 9162 | if (!*that || *that == ';') |
-
diff -urN '--exclude=*.orig' '--exclude=*.rej' vim74.orig/src/misc2.c vim74/src/misc2.c
|
old
|
new
|
|
| 166 | 166 | #ifdef FEAT_VIRTUALEDIT |
| 167 | 167 | if ((addspaces || finetune) && !VIsual_active) |
| 168 | 168 | { |
| 169 | | curwin->w_curswant = linetabsize(line) + one_more; |
| | 169 | curwin->w_curswant = linetabsize(line, pos->lnum) + one_more; |
| 170 | 170 | if (curwin->w_curswant > 0) |
| 171 | 171 | --curwin->w_curswant; |
| 172 | 172 | } |
| … |
… |
|
| 184 | 184 | # endif |
| 185 | 185 | && wcol >= (colnr_T)width) |
| 186 | 186 | { |
| 187 | | csize = linetabsize(line); |
| | 187 | csize = linetabsize(line, pos->lnum); |
| 188 | 188 | if (csize > 0) |
| 189 | 189 | csize--; |
| 190 | 190 | |
| … |
… |
|
| 205 | 205 | { |
| 206 | 206 | /* Count a tab for what it's worth (if list mode not on) */ |
| 207 | 207 | #ifdef FEAT_LINEBREAK |
| 208 | | csize = win_lbr_chartabsize(curwin, ptr, col, &head); |
| | 208 | csize = win_lbr_chartabsize(curwin, ptr, col, &head, pos->lnum); |
| 209 | 209 | mb_ptr_adv(ptr); |
| 210 | 210 | #else |
| 211 | | csize = lbr_chartabsize_adv(&ptr, col); |
| | 211 | csize = lbr_chartabsize_adv(&ptr, col, pos->lnum); |
| 212 | 212 | #endif |
| 213 | 213 | col += csize; |
| 214 | 214 | } |
-
diff -urN '--exclude=*.orig' '--exclude=*.rej' vim74.orig/src/normal.c vim74/src/normal.c
|
old
|
new
|
|
| 4535 | 4535 | int dir; |
| 4536 | 4536 | long dist; |
| 4537 | 4537 | { |
| 4538 | | int linelen = linetabsize(ml_get_curline()); |
| | 4538 | int linelen = linetabsize(ml_get_curline(), curwin->w_cursor.lnum); |
| 4539 | 4539 | int retval = OK; |
| 4540 | 4540 | int atend = FALSE; |
| 4541 | 4541 | int n; |
| … |
… |
|
| 4608 | 4608 | (void)hasFolding(curwin->w_cursor.lnum, |
| 4609 | 4609 | &curwin->w_cursor.lnum, NULL); |
| 4610 | 4610 | #endif |
| 4611 | | linelen = linetabsize(ml_get_curline()); |
| | 4611 | linelen = linetabsize(ml_get_curline(), curwin->w_cursor.lnum); |
| 4612 | 4612 | if (linelen > width1) |
| 4613 | 4613 | curwin->w_curswant += (((linelen - width1 - 1) / width2) |
| 4614 | 4614 | + 1) * width2; |
| … |
… |
|
| 4638 | 4638 | } |
| 4639 | 4639 | curwin->w_cursor.lnum++; |
| 4640 | 4640 | curwin->w_curswant %= width2; |
| 4641 | | linelen = linetabsize(ml_get_curline()); |
| | 4641 | linelen = linetabsize(ml_get_curline(), curwin->w_cursor.lnum); |
| 4642 | 4642 | } |
| 4643 | 4643 | } |
| 4644 | 4644 | } |
-
diff -urN '--exclude=*.orig' '--exclude=*.rej' vim74.orig/src/ops.c vim74/src/ops.c
|
old
|
new
|
|
| 435 | 435 | } |
| 436 | 436 | for ( ; vim_iswhite(*bd.textstart); ) |
| 437 | 437 | { |
| 438 | | incr = lbr_chartabsize_adv(&bd.textstart, (colnr_T)(bd.start_vcol)); |
| | 438 | incr = lbr_chartabsize_adv(&bd.textstart, (colnr_T)(bd.start_vcol), curwin->w_cursor.lnum); |
| 439 | 439 | total += incr; |
| 440 | 440 | bd.start_vcol += incr; |
| 441 | 441 | } |
| … |
… |
|
| 495 | 495 | |
| 496 | 496 | while (vim_iswhite(*non_white)) |
| 497 | 497 | { |
| 498 | | incr = lbr_chartabsize_adv(&non_white, non_white_col); |
| | 498 | incr = lbr_chartabsize_adv(&non_white, non_white_col, curwin->w_cursor.lnum); |
| 499 | 499 | non_white_col += incr; |
| 500 | 500 | } |
| 501 | 501 | |
| … |
… |
|
| 520 | 520 | verbatim_copy_width -= bd.start_char_vcols; |
| 521 | 521 | while (verbatim_copy_width < destination_col) |
| 522 | 522 | { |
| 523 | | incr = lbr_chartabsize(verbatim_copy_end, verbatim_copy_width); |
| | 523 | incr = lbr_chartabsize(verbatim_copy_end, verbatim_copy_width, curwin->w_cursor.lnum); |
| 524 | 524 | if (verbatim_copy_width + incr > destination_col) |
| 525 | 525 | break; |
| 526 | 526 | verbatim_copy_width += incr; |
| … |
… |
|
| 3623 | 3623 | for (ptr = oldp; vcol < col && *ptr; ) |
| 3624 | 3624 | { |
| 3625 | 3625 | /* Count a tab for what it's worth (if list mode not on) */ |
| 3626 | | incr = lbr_chartabsize_adv(&ptr, (colnr_T)vcol); |
| | 3626 | incr = lbr_chartabsize_adv(&ptr, (colnr_T)vcol, lnum); |
| 3627 | 3627 | vcol += incr; |
| 3628 | 3628 | } |
| 3629 | 3629 | bd.textcol = (colnr_T)(ptr - oldp); |
| … |
… |
|
| 3657 | 3657 | /* calculate number of spaces required to fill right side of block*/ |
| 3658 | 3658 | spaces = y_width + 1; |
| 3659 | 3659 | for (j = 0; j < yanklen; j++) |
| 3660 | | spaces -= lbr_chartabsize(&y_array[i][j], 0); |
| | 3660 | spaces -= lbr_chartabsize(&y_array[i][j], 0, lnum); |
| 3661 | 3661 | if (spaces < 0) |
| 3662 | 3662 | spaces = 0; |
| 3663 | 3663 | |
| … |
… |
|
| 5174 | 5174 | while (bdp->start_vcol < oap->start_vcol && *pstart) |
| 5175 | 5175 | { |
| 5176 | 5176 | /* Count a tab for what it's worth (if list mode not on) */ |
| 5177 | | incr = lbr_chartabsize(pstart, (colnr_T)bdp->start_vcol); |
| | 5177 | incr = lbr_chartabsize(pstart, (colnr_T)bdp->start_vcol, lnum); |
| 5178 | 5178 | bdp->start_vcol += incr; |
| 5179 | 5179 | #ifdef FEAT_VISUALEXTRA |
| 5180 | 5180 | if (vim_iswhite(*pstart)) |
| … |
… |
|
| 5243 | 5243 | { |
| 5244 | 5244 | /* Count a tab for what it's worth (if list mode not on) */ |
| 5245 | 5245 | prev_pend = pend; |
| 5246 | | incr = lbr_chartabsize_adv(&pend, (colnr_T)bdp->end_vcol); |
| | 5246 | incr = lbr_chartabsize_adv(&pend, (colnr_T)bdp->end_vcol, lnum); |
| 5247 | 5247 | bdp->end_vcol += incr; |
| 5248 | 5248 | } |
| 5249 | 5249 | if (bdp->end_vcol <= oap->end_vcol |
| … |
… |
|
| 6756 | 6756 | validate_virtcol(); |
| 6757 | 6757 | col_print(buf1, sizeof(buf1), (int)curwin->w_cursor.col + 1, |
| 6758 | 6758 | (int)curwin->w_virtcol + 1); |
| 6759 | | col_print(buf2, sizeof(buf2), (int)STRLEN(p), linetabsize(p)); |
| | 6759 | col_print(buf2, sizeof(buf2), (int)STRLEN(p), linetabsize(p, curwin->w_cursor.lnum)); |
| 6760 | 6760 | |
| 6761 | 6761 | if (char_count_cursor == byte_count_cursor |
| 6762 | 6762 | && char_count == byte_count) |
-
diff -urN '--exclude=*.orig' '--exclude=*.rej' vim74.orig/src/option.c vim74/src/option.c
|
old
|
new
|
|
| 187 | 187 | #ifdef FEAT_ARABIC |
| 188 | 188 | # define PV_ARAB OPT_WIN(WV_ARAB) |
| 189 | 189 | #endif |
| | 190 | #ifdef FEAT_LINEBREAK |
| | 191 | # define PV_BRI OPT_WIN(WV_BRI) |
| | 192 | # define PV_BRIMIN OPT_WIN(WV_BRIMIN) |
| | 193 | # define PV_BRISHIFT OPT_WIN(WV_BRISHIFT) |
| | 194 | #endif |
| 190 | 195 | #ifdef FEAT_DIFF |
| 191 | 196 | # define PV_DIFF OPT_WIN(WV_DIFF) |
| 192 | 197 | #endif |
| … |
… |
|
| 646 | 651 | {(char_u *)0L, (char_u *)0L} |
| 647 | 652 | #endif |
| 648 | 653 | SCRIPTID_INIT}, |
| | 654 | {"breakindent", "bri", P_BOOL|P_VI_DEF|P_VIM|P_RWIN, |
| | 655 | #ifdef FEAT_LINEBREAK |
| | 656 | (char_u *)VAR_WIN, PV_BRI, |
| | 657 | {(char_u *)FALSE, (char_u *)0L} |
| | 658 | #else |
| | 659 | (char_u *)NULL, PV_NONE, |
| | 660 | {(char_u *)0L, (char_u *)0L} |
| | 661 | #endif |
| | 662 | SCRIPTID_INIT}, |
| | 663 | {"breakindentmin", "brimin", P_NUM|P_VI_DEF|P_VIM|P_RWIN, |
| | 664 | #ifdef FEAT_LINEBREAK |
| | 665 | (char_u *)VAR_WIN, PV_BRIMIN, |
| | 666 | {(char_u *)20L, (char_u *)20L} |
| | 667 | #else |
| | 668 | (char_u *)NULL, PV_NONE, |
| | 669 | {(char_u *)0L, (char_u *)0L} |
| | 670 | #endif |
| | 671 | SCRIPTID_INIT}, |
| | 672 | {"breakindentshift", "brishift", P_NUM|P_VI_DEF|P_VIM|P_RWIN, |
| | 673 | #ifdef FEAT_LINEBREAK |
| | 674 | (char_u *)VAR_WIN, PV_BRISHIFT, |
| | 675 | {(char_u *)0L, (char_u *)0L} |
| | 676 | #else |
| | 677 | (char_u *)NULL, PV_NONE, |
| | 678 | {(char_u *)0L, (char_u *)0L} |
| | 679 | #endif |
| | 680 | SCRIPTID_INIT}, |
| 649 | 681 | {"browsedir", "bsdir",P_STRING|P_VI_DEF, |
| 650 | 682 | #ifdef FEAT_BROWSE |
| 651 | 683 | (char_u *)&p_bsdir, PV_NONE, |
| … |
… |
|
| 8484 | 8516 | } |
| 8485 | 8517 | curwin->w_nrwidth_line_count = 0; |
| 8486 | 8518 | } |
| | 8519 | |
| | 8520 | /* 'breakindentmin' must be positive */ |
| | 8521 | else if (pp == &curwin->w_p_brimin) |
| | 8522 | { |
| | 8523 | if (curwin->w_p_brimin < 1) |
| | 8524 | { |
| | 8525 | errmsg = e_positive; |
| | 8526 | curwin->w_p_brimin = 1; |
| | 8527 | } |
| | 8528 | } |
| 8487 | 8529 | #endif |
| 8488 | 8530 | |
| 8489 | 8531 | else if (pp == &curbuf->b_p_tw) |
| … |
… |
|
| 9937 | 9979 | case PV_WRAP: return (char_u *)&(curwin->w_p_wrap); |
| 9938 | 9980 | #ifdef FEAT_LINEBREAK |
| 9939 | 9981 | case PV_LBR: return (char_u *)&(curwin->w_p_lbr); |
| | 9982 | case PV_BRI: return (char_u *)&(curwin->w_p_bri); |
| | 9983 | case PV_BRIMIN: return (char_u *)&(curwin->w_p_brimin); |
| | 9984 | case PV_BRISHIFT: return (char_u *)&(curwin->w_p_brishift); |
| 9940 | 9985 | #endif |
| 9941 | 9986 | #ifdef FEAT_SCROLLBIND |
| 9942 | 9987 | case PV_SCBIND: return (char_u *)&(curwin->w_p_scb); |
| … |
… |
|
| 10126 | 10171 | #endif |
| 10127 | 10172 | #ifdef FEAT_LINEBREAK |
| 10128 | 10173 | to->wo_lbr = from->wo_lbr; |
| | 10174 | to->wo_bri = from->wo_bri; |
| | 10175 | to->wo_brimin = from->wo_brimin; |
| 10129 | 10176 | #endif |
| 10130 | 10177 | #ifdef FEAT_SCROLLBIND |
| 10131 | 10178 | to->wo_scb = from->wo_scb; |
-
diff -urN '--exclude=*.orig' '--exclude=*.rej' vim74.orig/src/option.h vim74/src/option.h
|
old
|
new
|
|
| 1053 | 1053 | #ifdef FEAT_CURSORBIND |
| 1054 | 1054 | , WV_CRBIND |
| 1055 | 1055 | #endif |
| | 1056 | #ifdef FEAT_LINEBREAK |
| | 1057 | , WV_BRI |
| | 1058 | , WV_BRIMIN |
| | 1059 | , WV_BRISHIFT |
| | 1060 | #endif |
| 1056 | 1061 | #ifdef FEAT_DIFF |
| 1057 | 1062 | , WV_DIFF |
| 1058 | 1063 | #endif |
-
diff -urN '--exclude=*.orig' '--exclude=*.rej' vim74.orig/src/proto/charset.pro vim74/src/proto/charset.pro
|
old
|
new
|
|
| 14 | 14 | int vim_strsize __ARGS((char_u *s)); |
| 15 | 15 | int vim_strnsize __ARGS((char_u *s, int len)); |
| 16 | 16 | int chartabsize __ARGS((char_u *p, colnr_T col)); |
| 17 | | int linetabsize __ARGS((char_u *s)); |
| 18 | | int linetabsize_col __ARGS((int startcol, char_u *s)); |
| 19 | | int win_linetabsize __ARGS((win_T *wp, char_u *p, colnr_T len)); |
| | 17 | int linetabsize __ARGS((char_u *s, linenr_T lnum)); |
| | 18 | int linetabsize_col __ARGS((int startcol, char_u *s, linenr_T lnum)); |
| | 19 | int win_linetabsize __ARGS((win_T *wp, char_u *p, colnr_T len, linenr_T lnum)); |
| 20 | 20 | int vim_isIDc __ARGS((int c)); |
| 21 | 21 | int vim_iswordc __ARGS((int c)); |
| 22 | 22 | int vim_iswordc_buf __ARGS((int c, buf_T *buf)); |
| … |
… |
|
| 26 | 26 | int vim_isfilec_or_wc __ARGS((int c)); |
| 27 | 27 | int vim_isprintc __ARGS((int c)); |
| 28 | 28 | int vim_isprintc_strict __ARGS((int c)); |
| 29 | | int lbr_chartabsize __ARGS((unsigned char *s, colnr_T col)); |
| 30 | | int lbr_chartabsize_adv __ARGS((char_u **s, colnr_T col)); |
| 31 | | int win_lbr_chartabsize __ARGS((win_T *wp, char_u *s, colnr_T col, int *headp)); |
| | 29 | int lbr_chartabsize __ARGS((unsigned char *s, colnr_T col, linenr_T lnum)); |
| | 30 | int lbr_chartabsize_adv __ARGS((char_u **s, colnr_T col, linenr_T lnum)); |
| | 31 | int win_lbr_chartabsize __ARGS((win_T *wp, char_u *s, colnr_T col, int *headp, linenr_T lnum)); |
| 32 | 32 | int in_win_border __ARGS((win_T *wp, colnr_T vcol)); |
| 33 | 33 | void getvcol __ARGS((win_T *wp, pos_T *pos, colnr_T *start, colnr_T *cursor, colnr_T *end)); |
| 34 | 34 | colnr_T getvcol_nolist __ARGS((pos_T *posp)); |
-
diff -urN '--exclude=*.orig' '--exclude=*.rej' vim74.orig/src/proto/misc1.pro vim74/src/proto/misc1.pro
|
old
|
new
|
|
| 5 | 5 | int get_indent_str __ARGS((char_u *ptr, int ts)); |
| 6 | 6 | int set_indent __ARGS((int size, int flags)); |
| 7 | 7 | int get_number_indent __ARGS((linenr_T lnum)); |
| | 8 | int get_breakindent_win __ARGS((win_T *wp, linenr_T lnum)); |
| 8 | 9 | int open_line __ARGS((int dir, int flags, int second_line_indent)); |
| 9 | 10 | int get_leader_len __ARGS((char_u *line, char_u **flags, int backward, int include_space)); |
| 10 | 11 | int get_last_leader_offset __ARGS((char_u *line, char_u **flags)); |
-
diff -urN '--exclude=*.orig' '--exclude=*.rej' vim74.orig/src/regexp.c vim74/src/regexp.c
|
old
|
new
|
|
| 4252 | 4252 | end = end2; |
| 4253 | 4253 | if (top.col == MAXCOL || bot.col == MAXCOL) |
| 4254 | 4254 | end = MAXCOL; |
| 4255 | | cols = win_linetabsize(wp, regline, (colnr_T)(reginput - regline)); |
| | 4255 | cols = win_linetabsize(wp, regline, (colnr_T)(reginput - regline), lnum); |
| 4256 | 4256 | if (cols < start || cols > end - (*p_sel == 'e')) |
| 4257 | 4257 | return FALSE; |
| 4258 | 4258 | } |
| … |
… |
|
| 4460 | 4460 | case RE_VCOL: |
| 4461 | 4461 | if (!re_num_cmp((long_u)win_linetabsize( |
| 4462 | 4462 | reg_win == NULL ? curwin : reg_win, |
| 4463 | | regline, (colnr_T)(reginput - regline)) + 1, scan)) |
| | 4463 | regline, (colnr_T)(reginput - regline), reglnum + reg_firstlnum ) + 1, scan)) |
| 4464 | 4464 | status = RA_NOMATCH; |
| 4465 | 4465 | break; |
| 4466 | 4466 | |
-
diff -urN '--exclude=*.orig' '--exclude=*.rej' vim74.orig/src/regexp_nfa.c vim74/src/regexp_nfa.c
|
old
|
new
|
|
| 6051 | 6051 | result = nfa_re_num_cmp(t->state->val, t->state->c - NFA_VCOL, |
| 6052 | 6052 | (long_u)win_linetabsize( |
| 6053 | 6053 | reg_win == NULL ? curwin : reg_win, |
| 6054 | | regline, (colnr_T)(reginput - regline)) + 1); |
| | 6054 | regline, (colnr_T)(reginput - regline), reglnum + reg_firstlnum) + 1); |
| 6055 | 6055 | if (result) |
| 6056 | 6056 | { |
| 6057 | 6057 | add_here = TRUE; |
-
diff -urN '--exclude=*.orig' '--exclude=*.rej' vim74.orig/src/screen.c vim74/src/screen.c
|
old
|
new
|
|
| 2974 | 2974 | # define WL_SIGN WL_FOLD /* column for signs */ |
| 2975 | 2975 | #endif |
| 2976 | 2976 | #define WL_NR WL_SIGN + 1 /* line number */ |
| | 2977 | #ifdef FEAT_LINEBREAK |
| | 2978 | # define WL_BRI WL_NR + 1 /* 'breakindent' */ |
| | 2979 | #else |
| | 2980 | # define WL_BRI WL_NR |
| | 2981 | #endif |
| 2977 | 2982 | #if defined(FEAT_LINEBREAK) || defined(FEAT_DIFF) |
| 2978 | | # define WL_SBR WL_NR + 1 /* 'showbreak' or 'diff' */ |
| | 2983 | # define WL_SBR WL_BRI + 1 /* 'showbreak' or 'diff' */ |
| 2979 | 2984 | #else |
| 2980 | | # define WL_SBR WL_NR |
| | 2985 | # define WL_SBR WL_BRI |
| 2981 | 2986 | #endif |
| 2982 | 2987 | #define WL_LINE WL_SBR + 1 /* text in the line */ |
| 2983 | 2988 | int draw_state = WL_START; /* what to draw next */ |
| … |
… |
|
| 3316 | 3321 | #endif |
| 3317 | 3322 | while (vcol < v && *ptr != NUL) |
| 3318 | 3323 | { |
| 3319 | | c = win_lbr_chartabsize(wp, ptr, (colnr_T)vcol, NULL); |
| | 3324 | c = win_lbr_chartabsize(wp, ptr, (colnr_T)vcol, NULL, lnum); |
| 3320 | 3325 | vcol += c; |
| 3321 | 3326 | #ifdef FEAT_MBYTE |
| 3322 | 3327 | prev_ptr = ptr; |
| … |
… |
|
| 3698 | 3703 | } |
| 3699 | 3704 | } |
| 3700 | 3705 | |
| | 3706 | #ifdef FEAT_LINEBREAK |
| | 3707 | /* draw 'breakindent': indent wrapped text accordingly */ |
| | 3708 | if (draw_state == WL_BRI -1 && n_extra == 0){ |
| | 3709 | draw_state = WL_BRI; |
| | 3710 | # ifdef FEAT_DIFF |
| | 3711 | /* FIXME: handle (filler_todo > 0): or modify showbreak so that ---- lines are shorter by the amount needed? */ |
| | 3712 | # endif |
| | 3713 | if (wp->w_p_bri && row != startrow){ /* FIXME: what is startrow? Don't we need it as well?? */ |
| | 3714 | p_extra = NUL; |
| | 3715 | c_extra = ' '; |
| | 3716 | n_extra = get_breakindent_win(wp,lnum); |
| | 3717 | char_attr = 0; /* was: hl_attr(HLF_AT); */ |
| | 3718 | /* FIXME: why do we need to adjust vcol if showbreak does not?? */ |
| | 3719 | // vcol += n_extra; |
| | 3720 | /* FIXME: is this relevant here? copied shamelessly from showbreak */ |
| | 3721 | /* Correct end of highlighted area for 'breakindent', |
| | 3722 | * required when 'linebreak' is also set. */ |
| | 3723 | if (tocol == vcol) |
| | 3724 | tocol += n_extra; |
| | 3725 | } |
| | 3726 | } |
| | 3727 | #endif |
| | 3728 | |
| | 3729 | |
| 3701 | 3730 | #if defined(FEAT_LINEBREAK) || defined(FEAT_DIFF) |
| 3702 | 3731 | if (draw_state == WL_SBR - 1 && n_extra == 0) |
| 3703 | 3732 | { |
| … |
… |
|
| 4409 | 4438 | # ifdef FEAT_MBYTE |
| 4410 | 4439 | has_mbyte ? mb_l : |
| 4411 | 4440 | # endif |
| 4412 | | 1), (colnr_T)vcol, NULL) - 1; |
| | 4441 | 1), (colnr_T)vcol, NULL, lnum) - 1; |
| 4413 | 4442 | c_extra = ' '; |
| 4414 | 4443 | if (vim_iswhite(c)) |
| 4415 | 4444 | { |
-
diff -urN '--exclude=*.orig' '--exclude=*.rej' vim74.orig/src/structs.h vim74/src/structs.h
|
old
|
new
|
|
| 134 | 134 | int wo_arab; |
| 135 | 135 | # define w_p_arab w_onebuf_opt.wo_arab /* 'arabic' */ |
| 136 | 136 | #endif |
| | 137 | #ifdef FEAT_LINEBREAK |
| | 138 | int wo_bri; |
| | 139 | # define w_p_bri w_onebuf_opt.wo_bri /* 'breakindent' */ |
| | 140 | long wo_brimin; |
| | 141 | # define w_p_brimin w_onebuf_opt.wo_brimin /* 'breakindentmin' */ |
| | 142 | long wo_brishift; |
| | 143 | # define w_p_brishift w_onebuf_opt.wo_brishift /* 'breakindentshift' */ |
| | 144 | #endif |
| 137 | 145 | #ifdef FEAT_DIFF |
| 138 | 146 | int wo_diff; |
| 139 | 147 | # define w_p_diff w_onebuf_opt.wo_diff /* 'diff' */ |
-
diff -urN '--exclude=*.orig' '--exclude=*.rej' vim74.orig/src/ui.c vim74/src/ui.c
|
old
|
new
|
|
| 3175 | 3175 | start = ptr = ml_get_buf(wp->w_buffer, lnum, FALSE); |
| 3176 | 3176 | while (count < vcol && *ptr != NUL) |
| 3177 | 3177 | { |
| 3178 | | count += win_lbr_chartabsize(wp, ptr, count, NULL); |
| | 3178 | count += win_lbr_chartabsize(wp, ptr, count, NULL, lnum); |
| 3179 | 3179 | mb_ptr_adv(ptr); |
| 3180 | 3180 | } |
| 3181 | 3181 | return (int)(ptr - start); |