diff options
| author | Mehmet Samet Duman <yongdohyun@projecttick.org> | 2026-04-03 22:21:25 +0300 |
|---|---|---|
| committer | Mehmet Samet Duman <yongdohyun@projecttick.org> | 2026-04-04 00:23:03 +0300 |
| commit | 2eae5db069dc171f74cd863487655f6a88e5384d (patch) | |
| tree | 2d9d05e09978a2a44acbfbb8d651f240df3ca052 /uvim/src/normal.c | |
| parent | 473d922faed49241a5d29d9e37dc4819cd512006 (diff) | |
| download | Project-Tick-2eae5db069dc171f74cd863487655f6a88e5384d.tar.gz Project-Tick-2eae5db069dc171f74cd863487655f6a88e5384d.zip | |
NOISSUE rebrand vim to MNV's not Vim
Signed-off-by: Mehmet Samet Duman <yongdohyun@projecttick.org>
Diffstat (limited to 'uvim/src/normal.c')
| -rw-r--r-- | uvim/src/normal.c | 204 |
1 files changed, 102 insertions, 102 deletions
diff --git a/uvim/src/normal.c b/uvim/src/normal.c index 01ea4c0915..c04998a483 100644 --- a/uvim/src/normal.c +++ b/uvim/src/normal.c @@ -1,10 +1,10 @@ /* vi:set ts=8 sts=4 sw=4 noet: * - * VIM - Vi IMproved by Bram Moolenaar et al. + * MNV - MNV is not Vim by Bram Moolenaar et al. * - * Do ":help uganda" in Vim to read copying and usage conditions. - * Do ":help credits" in Vim to see a list of people who contributed. - * See README.txt for an overview of the Vim source code. + * Do ":help uganda" in MNV to read copying and usage conditions. + * Do ":help credits" in MNV to see a list of people who contributed. + * See README.txt for an overview of the MNV source code. */ /* * normal.c: Contains the main routine for processing characters in command @@ -12,7 +12,7 @@ * the operators. */ -#include "vim.h" +#include "mnv.h" static int VIsual_mode_orig = NUL; // saved Visual mode @@ -127,7 +127,7 @@ static void nv_cursorhold(cmdarg_T *cap); #define DO_DECLARE_NVCMD #include "nv_cmds.h" -// Include the lookuptable generated by create_nvcmdidx.vim. +// Include the lookuptable generated by create_nvcmdidx.mnv. #include "nv_cmdidxs.h" /* @@ -486,7 +486,7 @@ normal_cmd_get_more_chars( if (*cp == Ctrl_K && ((nv_cmds[idx].cmd_flags & NV_LANG) || cp == &cap->extra_char) - && vim_strchr(p_cpo, CPO_DIGRAPH) == NULL) + && mnv_strchr(p_cpo, CPO_DIGRAPH) == NULL) { c = get_digraph(FALSE); if (c > 0) @@ -569,7 +569,7 @@ normal_cmd_get_more_chars( cap->ncharC2 = c; } ++no_mapping; - // Vim may be in a different mode when the user types the next key, + // MNV may be in a different mode when the user types the next key, // but when replaying a recording the next key is already in the // typeahead buffer, so record an <Ignore> before that to prevent // the vpeekc() above from applying wrong mappings when replaying. @@ -654,11 +654,11 @@ normal_cmd_wait_for_msg(void) // now reset it, otherwise it's put in the history again keep_msg = kmsg; - kmsg = vim_strsave(keep_msg); + kmsg = mnv_strsave(keep_msg); if (kmsg != NULL) { msg_attr((char *)kmsg, keep_msg_attr); - vim_free(kmsg); + mnv_free(kmsg); } } setcursor(); @@ -782,7 +782,7 @@ normal_cmd( // In Select mode, typed text replaces the selection. if (VIsual_active && VIsual_select - && (vim_isprintc(c) || c == NL || c == CAR || c == K_KENTER)) + && (mnv_isprintc(c) || c == NL || c == CAR || c == K_KENTER)) { int len; @@ -1026,7 +1026,7 @@ normal_end: clear_showcmd(); checkpcmark(); // check if we moved since setting pcmark - vim_free(ca.searchbuf); + mnv_free(ca.searchbuf); if (has_mbyte) mb_adjust_cursor(); @@ -1341,7 +1341,7 @@ find_ident_at_pos( } else while (ptr[col] != NUL - && (i == 0 ? !vim_iswordc(ptr[col]) : VIM_ISWHITE(ptr[col])) + && (i == 0 ? !mnv_iswordc(ptr[col]) : MNV_ISWHITE(ptr[col])) && (!(find_type & FIND_EVAL) || ptr[col] != ']') ) ++col; @@ -1387,10 +1387,10 @@ find_ident_at_pos( { while (col > 0 && ((i == 0 - ? vim_iswordc(ptr[col - 1]) - : (!VIM_ISWHITE(ptr[col - 1]) + ? mnv_iswordc(ptr[col - 1]) + : (!MNV_ISWHITE(ptr[col - 1]) && (!(find_type & FIND_IDENT) - || !vim_iswordc(ptr[col - 1])))) + || !mnv_iswordc(ptr[col - 1])))) || ((find_type & FIND_EVAL) && col > 1 && find_is_eval_item(ptr + col - 1, &col, @@ -1400,13 +1400,13 @@ find_ident_at_pos( // If we don't want just any old text, or we've found an // identifier, stop searching. - if (!(find_type & FIND_STRING) || vim_iswordc(ptr[col])) + if (!(find_type & FIND_STRING) || mnv_iswordc(ptr[col])) break; } } if (ptr[col] == NUL || (i == 0 - && (has_mbyte ? this_class != 2 : !vim_iswordc(ptr[col])))) + && (has_mbyte ? this_class != 2 : !mnv_iswordc(ptr[col])))) { // didn't find an identifier or text if ((find_type & FIND_NOERROR) == 0) @@ -1443,8 +1443,8 @@ find_ident_at_pos( col += (*mb_ptr2len)(ptr + col); } else - while ((i == 0 ? vim_iswordc(ptr[col]) - : (ptr[col] != NUL && !VIM_ISWHITE(ptr[col]))) + while ((i == 0 ? mnv_iswordc(ptr[col]) + : (ptr[col] != NUL && !MNV_ISWHITE(ptr[col]))) || ((find_type & FIND_EVAL) && col <= (int)startcol && find_is_eval_item(ptr + col, &col, &bn, FORWARD)) @@ -1657,11 +1657,11 @@ clear_showcmd(void) p_sbr = saved_sbr; curwin->w_p_sbr = saved_w_sbr; #endif - vim_snprintf((char *)showcmd_buf, SHOWCMD_BUFLEN, "%ldx%ld", lines, + mnv_snprintf((char *)showcmd_buf, SHOWCMD_BUFLEN, "%ldx%ld", lines, (long)(rightcol - leftcol + 1)); } else if (VIsual_mode == 'V' || VIsual.lnum != curwin->w_cursor.lnum) - vim_snprintf((char *)showcmd_buf, SHOWCMD_BUFLEN, "%ld", lines); + mnv_snprintf((char *)showcmd_buf, SHOWCMD_BUFLEN, "%ld", lines); else { char_u *s, *e; @@ -1693,9 +1693,9 @@ clear_showcmd(void) s += l; } if (bytes == chars) - vim_snprintf((char *)showcmd_buf, SHOWCMD_BUFLEN, "%d", chars); + mnv_snprintf((char *)showcmd_buf, SHOWCMD_BUFLEN, "%d", chars); else - vim_snprintf((char *)showcmd_buf, SHOWCMD_BUFLEN, "%d-%d", chars, bytes); + mnv_snprintf((char *)showcmd_buf, SHOWCMD_BUFLEN, "%d-%d", chars, bytes); } showcmd_buf[SHOWCMD_COLS] = NUL; // truncate showcmd_visual = TRUE; @@ -1757,7 +1757,7 @@ add_to_showcmd(int c) if (ignore[i] == c) return FALSE; - if (c <= 0x7f || !vim_isprintc(c)) + if (c <= 0x7f || !mnv_isprintc(c)) { p = transchar(c); if (*p == ' ') @@ -1836,7 +1836,7 @@ pop_showcmd(void) static void display_showcmd(void) { - int len = vim_strsize(showcmd_buf); + int len = mnv_strsize(showcmd_buf); showcmd_is_clear = (len == 0); cursor_off(); @@ -1912,7 +1912,7 @@ do_check_scrollbind(int check) (long)(curwin->w_leftcol - old_leftcol)); } } - else if (vim_strchr(p_sbo, 'j')) // jump flag set in 'scrollopt' + else if (mnv_strchr(p_sbo, 'j')) // jump flag set in 'scrollopt' { // When switching between windows, make sure that the relative // vertical offset is valid for the new window. The relative @@ -1955,11 +1955,11 @@ check_scrollbind(linenr_T topline_diff, long leftcol_diff) long y; // check 'scrollopt' string for vertical and horizontal scroll options - want_ver = (vim_strchr(p_sbo, 'v') && topline_diff != 0); + want_ver = (mnv_strchr(p_sbo, 'v') && topline_diff != 0); #ifdef FEAT_DIFF want_ver |= old_curwin->w_p_diff; #endif - want_hor = (vim_strchr(p_sbo, 'h') && (leftcol_diff || topline_diff != 0)); + want_hor = (mnv_strchr(p_sbo, 'h') && (leftcol_diff || topline_diff != 0)); // loop through the scrollbound windows and scroll accordingly VIsual_select = VIsual_active = 0; @@ -2204,8 +2204,8 @@ find_decl( // Put "\V" before the pattern to avoid that the special meaning of "." // and "~" causes trouble. - patlen = vim_snprintf((char *)pat, len + 7, - vim_iswordp(ptr) ? "\\V\\<%.*s\\>" : "\\V%.*s", len, ptr); + patlen = mnv_snprintf((char *)pat, len + 7, + mnv_iswordp(ptr) ? "\\V\\<%.*s\\>" : "\\V%.*s", len, ptr); old_pos = curwin->w_cursor; save_p_ws = p_ws; @@ -2318,7 +2318,7 @@ find_decl( reset_search_dir(); } - vim_free(pat); + mnv_free(pat); p_ws = save_p_ws; p_scs = save_p_scs; @@ -2467,13 +2467,13 @@ nv_screengo(oparg_T *oap, int dir, long dist) virtcol = curwin->w_virtcol; #if defined(FEAT_LINEBREAK) if (virtcol > (colnr_T)width1 && *get_showbreak_value(curwin) != NUL) - virtcol -= vim_strsize(get_showbreak_value(curwin)); + virtcol -= mnv_strsize(get_showbreak_value(curwin)); #endif c = (*mb_ptr2char)(ml_get_cursor()); if (dir == FORWARD && virtcol < curwin->w_curswant && (curwin->w_curswant <= (colnr_T)width1) - && !vim_isprintc(c) && c > 255) + && !mnv_isprintc(c) && c > 255) oneright(); if (virtcol > curwin->w_curswant @@ -2533,9 +2533,9 @@ nv_z_get_count(cmdarg_T *cap, int *nchar_arg) if (nchar == K_DEL || nchar == K_KDEL) n /= 10; - else if (VIM_ISDIGIT(nchar)) + else if (MNV_ISDIGIT(nchar)) { - if (vim_append_digit_long(&n, nchar - '0') == FAIL) + if (mnv_append_digit_long(&n, nchar - '0') == FAIL) { clearopbeep(cap->oap); break; @@ -2593,7 +2593,7 @@ nv_zg_zw(cmdarg_T *cap, int nchar) --allow_keys; (void)add_to_showcmd(nchar); - if (vim_strchr((char_u *)"gGwW", nchar) == NULL) + if (mnv_strchr((char_u *)"gGwW", nchar) == NULL) { clearopbeep(cap->oap); return OK; @@ -2646,7 +2646,7 @@ nv_zet(cmdarg_T *cap) #endif long siso = get_sidescrolloff_value(); - if (VIM_ISDIGIT(nchar) && !nv_z_get_count(cap, &nchar)) + if (MNV_ISDIGIT(nchar) && !nv_z_get_count(cap, &nchar)) return; if ( @@ -2655,7 +2655,7 @@ nv_zet(cmdarg_T *cap) // and "zC" only in Visual mode. "zj" and "zk" are motion // commands. cap->nchar != 'f' && cap->nchar != 'F' - && !(VIsual_active && vim_strchr((char_u *)"dcCoO", cap->nchar)) + && !(VIsual_active && mnv_strchr((char_u *)"dcCoO", cap->nchar)) && cap->nchar != 'j' && cap->nchar != 'k' && #endif @@ -2664,7 +2664,7 @@ nv_zet(cmdarg_T *cap) // For "z+", "z<CR>", "zt", "z.", "zz", "z^", "z-", "zb": // If line number given, set cursor. - if ((vim_strchr((char_u *)"+\r\nt.z^-b", nchar) != NULL) + if ((mnv_strchr((char_u *)"+\r\nt.z^-b", nchar) != NULL) && cap->count0 && cap->count0 != curwin->w_cursor.lnum) { @@ -3091,7 +3091,7 @@ handle_tabmenu(void) do_cmdline_cmd((char_u *)"confirm tabclose"); else { - vim_snprintf((char *)IObuff, IOSIZE, "confirm tabclose %d", + mnv_snprintf((char *)IObuff, IOSIZE, "confirm tabclose %d", current_tab); do_cmdline_cmd(IObuff); } @@ -3102,7 +3102,7 @@ handle_tabmenu(void) do_cmdline_cmd((char_u *)"$tabnew"); else { - vim_snprintf((char *)IObuff, IOSIZE, "%dtabnew", + mnv_snprintf((char *)IObuff, IOSIZE, "%dtabnew", current_tab - 1); do_cmdline_cmd(IObuff); } @@ -3113,7 +3113,7 @@ handle_tabmenu(void) do_cmdline_cmd((char_u *)"browse $tabnew"); else { - vim_snprintf((char *)IObuff, IOSIZE, "browse %dtabnew", + mnv_snprintf((char *)IObuff, IOSIZE, "browse %dtabnew", current_tab - 1); do_cmdline_cmd(IObuff); } @@ -3130,7 +3130,7 @@ nv_exmode(cmdarg_T *cap) { // Ignore 'Q' in Visual mode, just give a beep. if (VIsual_active) - vim_beep(BO_EX); + mnv_beep(BO_EX); else if (!checkclearop(cap->oap)) do_exmode(FALSE); } @@ -3258,8 +3258,8 @@ nv_clear(cmdarg_T *cap) # endif #endif redraw_later(UPD_CLEAR); -#if defined(MSWIN) && (!defined(FEAT_GUI_MSWIN) || defined(VIMDLL)) -# ifdef VIMDLL +#if defined(MSWIN) && (!defined(FEAT_GUI_MSWIN) || defined(MNVDLL)) +# ifdef MNVDLL if (!gui.in_use) # endif resize_console_buf(); @@ -3371,9 +3371,9 @@ nv_K_getcmd( { // 'keywordprog' is an ex command if (cap->count0 != 0) - *buflen = vim_snprintf((char *)buf, bufsize, "%s %ld ", kp, cap->count0); + *buflen = mnv_snprintf((char *)buf, bufsize, "%s %ld ", kp, cap->count0); else - *buflen = vim_snprintf((char *)buf, bufsize, "%s ", kp); + *buflen = mnv_snprintf((char *)buf, bufsize, "%s ", kp); return n; } @@ -3388,7 +3388,7 @@ nv_K_getcmd( { // found dashes only emsg(_(e_no_identifier_under_cursor)); - vim_free(buf); + mnv_free(buf); *ptr_arg = ptr; return 0; } @@ -3398,16 +3398,16 @@ nv_K_getcmd( isman = (STRCMP(kp, "man") == 0); isman_s = (STRCMP(kp, "man -s") == 0); if (cap->count0 != 0 && !(isman || isman_s)) - *buflen = vim_snprintf((char *)buf, bufsize, ".,.+%ld! ", cap->count0 - 1); + *buflen = mnv_snprintf((char *)buf, bufsize, ".,.+%ld! ", cap->count0 - 1); else - *buflen = vim_snprintf((char *)buf, bufsize, "! "); + *buflen = mnv_snprintf((char *)buf, bufsize, "! "); if (cap->count0 == 0 && isman_s) - *buflen += vim_snprintf((char *)buf + *buflen, bufsize - *buflen, "man "); + *buflen += mnv_snprintf((char *)buf + *buflen, bufsize - *buflen, "man "); else - *buflen += vim_snprintf((char *)buf + *buflen, bufsize - *buflen, "%s ", kp); + *buflen += mnv_snprintf((char *)buf + *buflen, bufsize - *buflen, "%s ", kp); if (cap->count0 != 0 && (isman || isman_s)) - *buflen += vim_snprintf((char *)buf + *buflen, bufsize - *buflen, "%ld ", cap->count0); + *buflen += mnv_snprintf((char *)buf + *buflen, bufsize - *buflen, "%ld ", cap->count0); *ptr_arg = ptr; return n; @@ -3500,7 +3500,7 @@ nv_ident(cmdarg_T *cap) setpcmark(); curwin->w_cursor.col = (colnr_T) (ptr - ml_get_curline()); - if (!g_cmd && vim_iswordp(ptr)) + if (!g_cmd && mnv_iswordp(ptr)) { STRCPY(buf, "\\<"); buflen = STRLEN_LITERAL("\\<"); @@ -3550,7 +3550,7 @@ nv_ident(cmdarg_T *cap) buflen = STRLEN_LITERAL("ta "); } else - buflen = vim_snprintf((char *)buf, bufsize, ":%ldta ", cap->count0); + buflen = mnv_snprintf((char *)buf, bufsize, ":%ldta ", cap->count0); } } @@ -3559,31 +3559,31 @@ nv_ident(cmdarg_T *cap) { size_t plen; - ptr = vim_strnsave(ptr, n); + ptr = mnv_strnsave(ptr, n); if (kp_ex) // Escape the argument properly for an Ex command - p = vim_strsave_fnameescape(ptr, VSE_NONE); + p = mnv_strsave_fnameescape(ptr, VSE_NONE); else // Escape the argument properly for a shell command - p = vim_strsave_shellescape(ptr, TRUE, TRUE); - vim_free(ptr); + p = mnv_strsave_shellescape(ptr, TRUE, TRUE); + mnv_free(ptr); if (p == NULL) { - vim_free(buf); + mnv_free(buf); return; } plen = STRLEN(p); - newbuf = vim_realloc(buf, buflen + plen + 1); + newbuf = mnv_realloc(buf, buflen + plen + 1); if (newbuf == NULL) { - vim_free(buf); - vim_free(p); + mnv_free(buf); + mnv_free(p); return; } buf = newbuf; STRCPY(buf + buflen, p); buflen += plen; - vim_free(p); + mnv_free(p); } else { @@ -3606,7 +3606,7 @@ nv_ident(cmdarg_T *cap) while (n-- > 0) { // put a backslash before \ and some others - if (vim_strchr(aux_ptr, *ptr) != NULL) + if (mnv_strchr(aux_ptr, *ptr) != NULL) *p++ = '\\'; // When current byte is a part of multibyte character, copy all @@ -3629,8 +3629,8 @@ nv_ident(cmdarg_T *cap) if (cmdchar == '*' || cmdchar == '#') { if (!g_cmd && (has_mbyte - ? vim_iswordp(mb_prevptr(ml_get_curline(), ptr)) - : vim_iswordc(ptr[-1]))) + ? mnv_iswordp(mb_prevptr(ml_get_curline(), ptr)) + : mnv_iswordc(ptr[-1]))) { STRCPY(buf + buflen, "\\>"); buflen += STRLEN_LITERAL("\\>"); @@ -3649,7 +3649,7 @@ nv_ident(cmdarg_T *cap) g_tag_at_cursor = FALSE; } - vim_free(buf); + mnv_free(buf); } /* @@ -3855,11 +3855,11 @@ nv_right(cmdarg_T *cap) // 'l' wraps to next line if 'whichwrap' has 'l'. // CURS_RIGHT wraps to next line if 'whichwrap' has '>'. if ( ((cap->cmdchar == ' ' - && vim_strchr(p_ww, 's') != NULL) + && mnv_strchr(p_ww, 's') != NULL) || (cap->cmdchar == 'l' - && vim_strchr(p_ww, 'l') != NULL) + && mnv_strchr(p_ww, 'l') != NULL) || (cap->cmdchar == K_RIGHT - && vim_strchr(p_ww, '>') != NULL)) + && mnv_strchr(p_ww, '>') != NULL)) && curwin->w_cursor.lnum < curbuf->b_ml.ml_line_count) { // When deleting we also count the NL as a character. @@ -3943,11 +3943,11 @@ nv_left(cmdarg_T *cap) // CURS_LEFT wraps to previous line if 'whichwrap' has '<'. if ( (((cap->cmdchar == K_BS || cap->cmdchar == Ctrl_H) - && vim_strchr(p_ww, 'b') != NULL) + && mnv_strchr(p_ww, 'b') != NULL) || (cap->cmdchar == 'h' - && vim_strchr(p_ww, 'h') != NULL) + && mnv_strchr(p_ww, 'h') != NULL) || (cap->cmdchar == K_LEFT - && vim_strchr(p_ww, '<') != NULL)) + && mnv_strchr(p_ww, '<') != NULL)) && curwin->w_cursor.lnum > 1) { --(curwin->w_cursor.lnum); @@ -4091,7 +4091,7 @@ nv_gotofile(cmdarg_T *cap) check_cursor_lnum(); beginline(BL_SOL | BL_FIX); } - vim_free(ptr); + mnv_free(ptr); } else clearop(cap->oap); @@ -4470,7 +4470,7 @@ nv_brackets(cmdarg_T *cap) // fwd bwd fwd bwd fwd bwd // identifier "]i" "[i" "]I" "[I" "]^I" "[^I" // define "]d" "[d" "]D" "[D" "]^D" "[^D" - if (vim_strchr((char_u *)"iI\011dD\004", cap->nchar) != NULL) + if (mnv_strchr((char_u *)"iI\011dD\004", cap->nchar) != NULL) { char_u *ptr; int len; @@ -4480,7 +4480,7 @@ nv_brackets(cmdarg_T *cap) else { // Make a copy, if the line was changed it will be freed. - ptr = vim_strnsave(ptr, len); + ptr = mnv_strnsave(ptr, len); if (ptr == NULL) return; @@ -4493,7 +4493,7 @@ nv_brackets(cmdarg_T *cap) cap->cmdchar == ']' ? curwin->w_cursor.lnum + 1 : (linenr_T)1, (linenr_T)MAXLNUM, FALSE, FALSE); - vim_free(ptr); + mnv_free(ptr); curwin->w_set_curswant = TRUE; } } @@ -4506,9 +4506,9 @@ nv_brackets(cmdarg_T *cap) // "[m" or "]m" search for prev/next start of (Java) method. // "[M" or "]M" search for prev/next end of (Java) method. if ( (cap->cmdchar == '[' - && vim_strchr((char_u *)"{(*/#mM", cap->nchar) != NULL) + && mnv_strchr((char_u *)"{(*/#mM", cap->nchar) != NULL) || (cap->cmdchar == ']' - && vim_strchr((char_u *)"})*/#mM", cap->nchar) != NULL)) + && mnv_strchr((char_u *)"})*/#mM", cap->nchar) != NULL)) nv_bracket_block(cap, &old_pos); // "[[", "[]", "]]" and "][": move to start or end of function @@ -5119,7 +5119,7 @@ n_swapchar(cmdarg_T *cap) if (checkclearopq(cap->oap)) return; - if (LINEEMPTY(curwin->w_cursor.lnum) && vim_strchr(p_ww, '~') == NULL) + if (LINEEMPTY(curwin->w_cursor.lnum) && mnv_strchr(p_ww, '~') == NULL) { clearopbeep(cap->oap); return; @@ -5140,7 +5140,7 @@ n_swapchar(cmdarg_T *cap) inc_cursor(); if (gchar_cursor() == NUL) { - if (vim_strchr(p_ww, '~') != NULL + if (mnv_strchr(p_ww, '~') != NULL && curwin->w_cursor.lnum < curbuf->b_ml.ml_line_count) { #ifdef FEAT_NETBEANS_INTG @@ -5246,7 +5246,7 @@ v_visop(cmdarg_T *cap) else if (cap->cmdchar == 'C' || cap->cmdchar == 'D') curwin->w_curswant = MAXCOL; } - cap->cmdchar = *(vim_strchr(trans, cap->cmdchar) + 1); + cap->cmdchar = *(mnv_strchr(trans, cap->cmdchar) + 1); nv_operator(cap); } @@ -5314,7 +5314,7 @@ nv_optrans(cmdarg_T *cap) { // In Vi "2D" doesn't delete the next line. Can't translate it // either, because "2." should also not use the count. - if (cap->cmdchar == 'D' && vim_strchr(p_cpo, CPO_HASH) != NULL) + if (cap->cmdchar == 'D' && mnv_strchr(p_cpo, CPO_HASH) != NULL) { cap->oap->start = curwin->w_cursor; cap->oap->op_type = OP_DELETE; @@ -5331,7 +5331,7 @@ nv_optrans(cmdarg_T *cap) { if (cap->count0) stuffnumReadbuff(cap->count0); - stuffReadbuff(ar[(int)(vim_strchr(str, cap->cmdchar) - str)]); + stuffReadbuff(ar[(int)(mnv_strchr(str, cap->cmdchar) - str)]); } } cap->opcount = 0; @@ -5594,7 +5594,7 @@ start_selection(void) may_start_select(int c) { VIsual_select = (c == 'o' || (stuff_empty() && typebuf_typed())) - && vim_strchr(p_slm, c) != NULL; + && mnv_strchr(p_slm, c) != NULL; } /* @@ -5809,7 +5809,7 @@ nv_g_home_m_cmd(cmdarg_T *cap) { do i = gchar_cursor(); - while (VIM_ISWHITE(i) && oneright() == OK); + while (MNV_ISWHITE(i) && oneright() == OK); curwin->w_valid &= ~VALID_WCOL; } curwin->w_set_curswant = TRUE; @@ -5851,7 +5851,7 @@ nv_g_underscore_cmd(cmdarg_T *cap) // Decrease the cursor column until it's on a non-blank. while (curwin->w_cursor.col > 0 - && VIM_ISWHITE(ptr[curwin->w_cursor.col])) + && MNV_ISWHITE(ptr[curwin->w_cursor.col])) --curwin->w_cursor.col; curwin->w_set_curswant = TRUE; adjust_for_sel(cap); @@ -5984,7 +5984,7 @@ nv_g_cmd(cmdarg_T *cap) #ifdef MEM_PROFILE // "g^A": dump log of used memory. if (!VIsual_active && cap->nchar == Ctrl_A) - vim_mem_profile_dump(); + mnv_mem_profile_dump(); else #endif // "g^A/g^X": sequentially increment visually selected region @@ -6357,7 +6357,7 @@ n_opencmd(cmdarg_T *cap) curwin->w_valid &= ~VALID_CROW; #endif // When '#' is in 'cpoptions' ignore the count. - if (vim_strchr(p_cpo, CPO_HASH) != NULL) + if (mnv_strchr(p_cpo, CPO_HASH) != NULL) cap->count1 = 1; invoke_edit(cap, FALSE, cap->cmdchar, TRUE); } @@ -6494,7 +6494,7 @@ nv_operator(cmdarg_T *cap) set_op_var(int optype) { if (optype == OP_NOP) - set_vim_var_string(VV_OP, NULL, 0); + set_mnv_var_string(VV_OP, NULL, 0); else { char_u opchars[3]; @@ -6502,7 +6502,7 @@ set_op_var(int optype) opchars[0] = get_op_char(optype); opchars[1] = get_extra_op_char(optype); opchars[2] = NUL; - set_vim_var_string(VV_OP, opchars, 2); + set_mnv_var_string(VV_OP, opchars, 2); } } #endif @@ -6614,13 +6614,13 @@ nv_wordcmd(cmdarg_T *cap) n = gchar_cursor(); if (n != NUL) // not an empty line { - if (VIM_ISWHITE(n)) + if (MNV_ISWHITE(n)) { // Reproduce a funny Vi behaviour: "cw" on a blank only // changes one character, not all blanks until the start of // the next word. Only do this when the 'w' flag is included // in 'cpoptions'. - if (cap->count1 == 1 && vim_strchr(p_cpo, CPO_CW) != NULL) + if (cap->count1 == 1 && mnv_strchr(p_cpo, CPO_CW) != NULL) { cap->oap->inclusive = TRUE; cap->oap->motion_type = MCHAR; @@ -6639,7 +6639,7 @@ nv_wordcmd(cmdarg_T *cap) // will change only one character! This is done by setting // flag. // This can be configured using :set cpo-z - if (vim_strchr(p_cpo, CPO_WORD) != NULL) + if (mnv_strchr(p_cpo, CPO_WORD) != NULL) { cap->oap->inclusive = TRUE; word_end = TRUE; @@ -6879,12 +6879,12 @@ nv_esc(cmdarg_T *cap) { int out_redir = !stdout_isatty && !is_not_a_term_or_gui(); - // The user may accidentally do "vim file | grep word" and then + // The user may accidentally do "mnv file | grep word" and then // CTRL-C doesn't show anything. With a changed buffer give the // message on stderr. Without any changes might as well exit. if (anyBufIsChanged()) { - char *ms = _("Type :qa! and press <Enter> to abandon all changes and exit Vim"); + char *ms = _("Type :qa! and press <Enter> to abandon all changes and exit MNV"); if (out_redir) mch_errmsg(ms); @@ -6899,7 +6899,7 @@ nv_esc(cmdarg_T *cap) do_cmdline_cmd((char_u *)"qa"); } else - msg(_("Type :qa and press <Enter> to exit Vim")); + msg(_("Type :qa and press <Enter> to exit MNV")); } } @@ -6940,7 +6940,7 @@ nv_esc(cmdarg_T *cap) popup_hide_message_win(); else #endif - vim_beep(BO_ESC); + mnv_beep(BO_ESC); } clearop(cap->oap); @@ -7079,7 +7079,7 @@ nv_edit(cmdarg_T *cap) break; case 'I': // "I"nsert before the first non-blank - if (vim_strchr(p_cpo, CPO_INSEND) == NULL) + if (mnv_strchr(p_cpo, CPO_INSEND) == NULL) beginline(BL_WHITE); else beginline(BL_WHITE|BL_FIX); @@ -7431,7 +7431,7 @@ nv_put_opt(cmdarg_T *cap, int fix_indent) adjust_clip_reg(®name); #endif if (regname == 0 || regname == '"' - || VIM_ISDIGIT(regname) || regname == '-' + || MNV_ISDIGIT(regname) || regname == '-' #ifdef FEAT_CLIPBOARD || (clip_unnamed && (regname == '*' || regname == '+')) #endif |
