--- vim-7.0.orig/upstream/patches/7.0.112 +++ vim-7.0/upstream/patches/7.0.112 @@ -0,0 +1,108 @@ +To: vim-dev@vim.org +Subject: Patch 7.0.112 +Fcc: outbox +From: Bram Moolenaar +Mime-Version: 1.0 +Content-Type: text/plain; charset=ISO-8859-1 +Content-Transfer-Encoding: 8bit +------------ + +Patch 7.0.112 +Problem: Python interface does not work with Python 2.5. +Solution: Change PyMem_DEL() to Py_DECREF(). (Sumner Hayes) +Files: src/if_python.c + + +*** ../vim-7.0.111/src/if_python.c Sun Apr 30 20:48:37 2006 +--- src/if_python.c Fri Sep 22 15:08:33 2006 +*************** +*** 1463,1469 **** + if (this->buf && this->buf != INVALID_BUFFER_VALUE) + this->buf->b_python_ref = NULL; + +! PyMem_DEL(self); + } + + static PyObject * +--- 1463,1469 ---- + if (this->buf && this->buf != INVALID_BUFFER_VALUE) + this->buf->b_python_ref = NULL; + +! Py_DECREF(self); + } + + static PyObject * +*************** +*** 1674,1680 **** + bufr = (BufferObject *)BufferNew(buf); + if (bufr == NULL) + { +! PyMem_DEL(self); + return NULL; + } + Py_INCREF(bufr); +--- 1674,1680 ---- + bufr = (BufferObject *)BufferNew(buf); + if (bufr == NULL) + { +! Py_DECREF(self); + return NULL; + } + Py_INCREF(bufr); +*************** +*** 1690,1696 **** + RangeDestructor(PyObject *self) + { + Py_DECREF(((RangeObject *)(self))->buf); +! PyMem_DEL(self); + } + + static PyObject * +--- 1690,1696 ---- + RangeDestructor(PyObject *self) + { + Py_DECREF(((RangeObject *)(self))->buf); +! Py_DECREF(self); + } + + static PyObject * +*************** +*** 1944,1950 **** + if (this->win && this->win != INVALID_WINDOW_VALUE) + this->win->w_python_ref = NULL; + +! PyMem_DEL(self); + } + + static int +--- 1944,1950 ---- + if (this->win && this->win != INVALID_WINDOW_VALUE) + this->win->w_python_ref = NULL; + +! Py_DECREF(self); + } + + static int +*** ../vim-7.0.111/src/version.c Tue Oct 3 14:43:31 2006 +--- src/version.c Tue Oct 3 14:46:10 2006 +*************** +*** 668,669 **** +--- 668,671 ---- + { /* Add new patch number below this line */ ++ /**/ ++ 112, + /**/ + +-- +A salesperson says: Translation: +"backward compatible" Old technology +"Premium" Overpriced +"Can't keep it on the shelf" Unavailable +"Stands alone" Piece of shit +"Proprietary" Incompatible + (Scott Adams - The Dilbert principle) + + /// Bram Moolenaar -- Bram@Moolenaar.net -- http://www.Moolenaar.net \\\ +/// sponsor Vim, vote for features -- http://www.Vim.org/sponsor/ \\\ +\\\ download, build and distribute -- http://www.A-A-P.org /// + \\\ help me help AIDS victims -- http://ICCF-Holland.org /// --- vim-7.0.orig/upstream/patches/7.0.074 +++ vim-7.0/upstream/patches/7.0.074 @@ -0,0 +1,270 @@ +To: vim-dev@vim.org +Subject: Patch 7.0.074 (extra) +Fcc: outbox +From: Bram Moolenaar +Mime-Version: 1.0 +Content-Type: text/plain; charset=ISO-8859-1 +Content-Transfer-Encoding: 8bit +------------ + +Patch 7.0.074 (extra) +Problem: Win32: tooltips were not converted from 'encoding' to Unicode. +Solution: Set the tooltip to use Unicode and do the conversion. Also + cleanup the code for the tab pages tooltips. (Yukihiro Nakadaira) +Files: src/gui_w32.c, src/gui_w48.c + + +*** ../vim-7.0.073/src/gui_w32.c Sat May 6 23:43:11 2006 +--- src/gui_w32.c Tue Aug 29 21:16:58 2006 +*************** +*** 889,1005 **** + # ifdef FEAT_MBYTE + case TTN_GETDISPINFOW: + # endif +! case TTN_NEEDTEXT: +! # ifdef FEAT_GUI_TABLINE +! if (gui_mch_showing_tabline() +! && ((LPNMHDR)lParam)->hwndFrom == +! TabCtrl_GetToolTips(s_tabhwnd)) + { +! LPNMTTDISPINFO lpdi; +! POINT pt; +! static char *tt_text = NULL; +! static int tt_text_len = 0; +! +! /* +! * Mouse is over the GUI tabline. Display the tooltip +! * for the tab under the cursor +! */ +! lpdi = (LPNMTTDISPINFO)lParam; +! lpdi->hinst = NULL; +! lpdi->szText[0] = '\0'; +! +! /* +! * Get the cursor position within the tab control +! */ +! GetCursorPos(&pt); +! if (ScreenToClient(s_tabhwnd, &pt) != 0) +! { +! TCHITTESTINFO htinfo; +! int idx; + + /* +! * Get the tab under the cursor + */ +! htinfo.pt.x = pt.x; +! htinfo.pt.y = pt.y; +! idx = TabCtrl_HitTest(s_tabhwnd, &htinfo); +! if (idx != -1) + { +! tabpage_T *tp; + +! tp = find_tabpage(idx + 1); +! if (tp != NULL) + { +! # ifdef FEAT_MBYTE +! WCHAR *wstr = NULL; +! # endif +! get_tabline_label(tp, TRUE); +! # ifdef FEAT_MBYTE +! if (enc_codepage >= 0 +! && (int)GetACP() != enc_codepage) +! { +! wstr = enc_to_ucs2(NameBuff, NULL); +! if (wstr != NULL) +! { +! int wlen; +! +! wlen = ((int)wcslen(wstr) + 1) +! * sizeof(WCHAR); +! if (tt_text_len < wlen) +! { +! tt_text = vim_realloc(tt_text, +! wlen); +! if (tt_text != NULL) +! tt_text_len = wlen; +! } +! if (tt_text != NULL) +! wcscpy((WCHAR *)tt_text, wstr); +! lpdi->lpszText = tt_text; +! vim_free(wstr); +! } +! } +! if (wstr == NULL) +! # endif +! { +! int len; + +! len = (int)STRLEN(NameBuff) + 1; +! if (tt_text_len < len) +! { +! tt_text = vim_realloc(tt_text, len); +! if (tt_text != NULL) +! tt_text_len = len; +! } +! if (tt_text != NULL) +! STRCPY(tt_text, NameBuff); +! lpdi->lpszText = tt_text; + } + } + } + } +- } +- else + # endif +- { + # ifdef FEAT_TOOLBAR +! LPTOOLTIPTEXT lpttt; +! UINT idButton; +! int idx; +! vimmenu_T *pMenu; +! +! lpttt = (LPTOOLTIPTEXT)lParam; +! idButton = (UINT) lpttt->hdr.idFrom; +! pMenu = gui_mswin_find_menu(root_menu, idButton); +! if (pMenu) + { +! idx = MENU_INDEX_TIP; +! if (pMenu->strings[idx]) + { +! lpttt->hinst = NULL; /* string, not resource */ +! lpttt->lpszText = pMenu->strings[idx]; + } +! } + # endif + } + break; + # ifdef FEAT_GUI_TABLINE +--- 889,978 ---- + # ifdef FEAT_MBYTE + case TTN_GETDISPINFOW: + # endif +! case TTN_GETDISPINFO: + { +! LPNMHDR hdr = (LPNMHDR)lParam; +! char_u *str = NULL; +! static void *tt_text = NULL; +! +! vim_free(tt_text); +! tt_text = NULL; + ++ # ifdef FEAT_GUI_TABLINE ++ if (gui_mch_showing_tabline() ++ && hdr->hwndFrom == TabCtrl_GetToolTips(s_tabhwnd)) ++ { ++ POINT pt; + /* +! * Mouse is over the GUI tabline. Display the +! * tooltip for the tab under the cursor +! * +! * Get the cursor position within the tab control + */ +! GetCursorPos(&pt); +! if (ScreenToClient(s_tabhwnd, &pt) != 0) + { +! TCHITTESTINFO htinfo; +! int idx; + +! /* +! * Get the tab under the cursor +! */ +! htinfo.pt.x = pt.x; +! htinfo.pt.y = pt.y; +! idx = TabCtrl_HitTest(s_tabhwnd, &htinfo); +! if (idx != -1) + { +! tabpage_T *tp; + +! tp = find_tabpage(idx + 1); +! if (tp != NULL) +! { +! get_tabline_label(tp, TRUE); +! str = NameBuff; + } + } + } + } + # endif + # ifdef FEAT_TOOLBAR +! # ifdef FEAT_GUI_TABLINE +! else +! # endif +! { +! UINT idButton; +! vimmenu_T *pMenu; +! +! idButton = (UINT) hdr->idFrom; +! pMenu = gui_mswin_find_menu(root_menu, idButton); +! if (pMenu) +! str = pMenu->strings[MENU_INDEX_TIP]; +! } +! # endif +! if (str != NULL) + { +! # ifdef FEAT_MBYTE +! if (hdr->code == TTN_GETDISPINFOW) + { +! LPNMTTDISPINFOW lpdi = (LPNMTTDISPINFOW)lParam; +! +! tt_text = enc_to_ucs2(str, NULL); +! lpdi->lpszText = tt_text; +! /* can't show tooltip if failed */ + } +! else + # endif ++ { ++ LPNMTTDISPINFO lpdi = (LPNMTTDISPINFO)lParam; ++ ++ if (STRLEN(str) < sizeof(lpdi->szText) ++ || ((tt_text = vim_strsave(str)) == NULL)) ++ vim_strncpy(lpdi->szText, str, ++ sizeof(lpdi->szText) - 1); ++ else ++ lpdi->lpszText = tt_text; ++ } ++ } + } + break; + # ifdef FEAT_GUI_TABLINE +*** ../vim-7.0.073/src/gui_w48.c Fri Jun 23 16:44:32 2006 +--- src/gui_w48.c Tue Aug 29 21:14:31 2006 +*************** +*** 2194,2200 **** +--- 2194,2211 ---- + return; + + if (showit) ++ { ++ # ifdef FEAT_MBYTE ++ # ifndef TB_SETUNICODEFORMAT ++ /* For older compilers. We assume this never changes. */ ++ # define TB_SETUNICODEFORMAT 0x2005 ++ # endif ++ /* Enable/disable unicode support */ ++ int uu = (enc_codepage >= 0 && (int)GetACP() != enc_codepage); ++ SendMessage(s_toolbarhwnd, TB_SETUNICODEFORMAT, (WPARAM)uu, (LPARAM)0); ++ # endif + ShowWindow(s_toolbarhwnd, SW_SHOW); ++ } + else + ShowWindow(s_toolbarhwnd, SW_HIDE); + } +*** ../vim-7.0.073/src/version.c Tue Aug 29 18:36:55 2006 +--- src/version.c Tue Aug 29 21:28:00 2006 +*************** +*** 668,669 **** +--- 668,671 ---- + { /* Add new patch number below this line */ ++ /**/ ++ 74, + /**/ + +-- +hundred-and-one symptoms of being an internet addict: +271. You collect hilarious signatures from all 250 mailing lists you + are subscribed to. + + /// Bram Moolenaar -- Bram@Moolenaar.net -- http://www.Moolenaar.net \\\ +/// sponsor Vim, vote for features -- http://www.Vim.org/sponsor/ \\\ +\\\ download, build and distribute -- http://www.A-A-P.org /// + \\\ help me help AIDS victims -- http://ICCF-Holland.org /// --- vim-7.0.orig/upstream/patches/7.0.013 +++ vim-7.0/upstream/patches/7.0.013 @@ -0,0 +1,154 @@ +To: vim-dev@vim.org +Subject: Patch 7.0.013 +Fcc: outbox +From: Bram Moolenaar +Mime-Version: 1.0 +Content-Type: text/plain; charset=ISO-8859-1 +Content-Transfer-Encoding: 8bit +------------ + +Patch 7.0.013 +Problem: Insert mode completion: using CTRL-L to add an extra character + also deselects the current match, making it impossible to use + CTRL-L a second time. +Solution: Keep the current match. Also make CTRL-L work at the original + text, using the first displayed match. +Files: src/edit.c + + +*** ../vim-7.0.012/src/edit.c Wed May 10 15:22:49 2006 +--- src/edit.c Thu May 11 10:38:54 2006 +*************** +*** 751,757 **** + continue; + } + +! /* Pressing CTRL-Y selects the current match. Shen + * compl_enter_selects is set the Enter key does the same. */ + if (c == Ctrl_Y || (compl_enter_selects + && (c == CAR || c == K_KENTER || c == NL))) +--- 751,757 ---- + continue; + } + +! /* Pressing CTRL-Y selects the current match. When + * compl_enter_selects is set the Enter key does the same. */ + if (c == Ctrl_Y || (compl_enter_selects + && (c == CAR || c == K_KENTER || c == NL))) +*************** +*** 3046,3052 **** + ins_compl_delete(); + ins_bytes(compl_leader + curwin->w_cursor.col - compl_col); + compl_used_match = FALSE; +- compl_enter_selects = FALSE; + + if (compl_started) + ins_compl_set_original_text(compl_leader); +--- 3046,3051 ---- +*************** +*** 3076,3081 **** +--- 3075,3081 ---- + compl_restarting = FALSE; + } + ++ #if 0 /* disabled, made CTRL-L, BS and typing char jump to original text. */ + if (!compl_used_match) + { + /* Go to the original text, since none of the matches is inserted. */ +*************** +*** 3087,3092 **** +--- 3087,3094 ---- + compl_curr_match = compl_shown_match; + compl_shows_dir = compl_direction; + } ++ #endif ++ compl_enter_selects = !compl_used_match; + + /* Show the popup menu with a different set of matches. */ + ins_compl_show_pum(); +*************** +*** 3175,3184 **** + char_u *p; + int len = curwin->w_cursor.col - compl_col; + int c; + + p = compl_shown_match->cp_str; + if ((int)STRLEN(p) <= len) /* the match is too short */ +! return; + p += len; + #ifdef FEAT_MBYTE + c = mb_ptr2char(p); +--- 3177,3208 ---- + char_u *p; + int len = curwin->w_cursor.col - compl_col; + int c; ++ compl_T *cp; + + p = compl_shown_match->cp_str; + if ((int)STRLEN(p) <= len) /* the match is too short */ +! { +! /* When still at the original match use the first entry that matches +! * the leader. */ +! if (compl_shown_match->cp_flags & ORIGINAL_TEXT) +! { +! p = NULL; +! for (cp = compl_shown_match->cp_next; cp != NULL +! && cp != compl_first_match; cp = cp->cp_next) +! { +! if (ins_compl_equal(cp, compl_leader, +! (int)STRLEN(compl_leader))) +! { +! p = cp->cp_str; +! break; +! } +! } +! if (p == NULL || (int)STRLEN(p) <= len) +! return; +! } +! else +! return; +! } + p += len; + #ifdef FEAT_MBYTE + c = mb_ptr2char(p); +*************** +*** 4100,4105 **** +--- 4124,4144 ---- + && compl_shown_match->cp_next != NULL + && compl_shown_match->cp_next != compl_first_match) + compl_shown_match = compl_shown_match->cp_next; ++ ++ /* If we didn't find it searching forward, and compl_shows_dir is ++ * backward, find the last match. */ ++ if (compl_shows_dir == BACKWARD ++ && !ins_compl_equal(compl_shown_match, ++ compl_leader, (int)STRLEN(compl_leader)) ++ && (compl_shown_match->cp_next == NULL ++ || compl_shown_match->cp_next == compl_first_match)) ++ { ++ while (!ins_compl_equal(compl_shown_match, ++ compl_leader, (int)STRLEN(compl_leader)) ++ && compl_shown_match->cp_prev != NULL ++ && compl_shown_match->cp_prev != compl_first_match) ++ compl_shown_match = compl_shown_match->cp_prev; ++ } + } + + if (allow_get_expansion && insert_match +*** ../vim-7.0.012/src/version.c Thu May 11 19:30:09 2006 +--- src/version.c Fri May 12 19:03:32 2006 +*************** +*** 668,669 **** +--- 668,671 ---- + { /* Add new patch number below this line */ ++ /**/ ++ 13, + /**/ + +-- +I'm writing a book. I've got the page numbers done. + + /// Bram Moolenaar -- Bram@Moolenaar.net -- http://www.Moolenaar.net \\\ +/// sponsor Vim, vote for features -- http://www.Vim.org/sponsor/ \\\ +\\\ download, build and distribute -- http://www.A-A-P.org /// + \\\ help me help AIDS victims -- http://ICCF-Holland.org /// --- vim-7.0.orig/upstream/patches/7.0.097 +++ vim-7.0/upstream/patches/7.0.097 @@ -0,0 +1,113 @@ +To: vim-dev@vim.org +Subject: Patch 7.0.097 +Fcc: outbox +From: Bram Moolenaar +Mime-Version: 1.0 +Content-Type: text/plain; charset=ISO-8859-1 +Content-Transfer-Encoding: 8bit +------------ + +Patch 7.0.097 +Problem: ":tabclose N" that closes another tab page does not remove the tab + pages line. Same problem when using the mouse. +Solution: Adjust the tab pages line when needed in tabpage_close_other(). +Files: src/ex_docmd.c + + +*** ../vim-7.0.096/src/ex_docmd.c Tue Aug 29 17:28:56 2006 +--- src/ex_docmd.c Sun Sep 10 15:47:33 2006 +*************** +*** 6296,6302 **** + exarg_T *eap; + { + tabpage_T *tp; +- int h = tabline_height(); + + # ifdef FEAT_CMDWIN + if (cmdwin_type != 0) +--- 6296,6301 ---- +*************** +*** 6328,6336 **** + ) + tabpage_close(eap->forceit); + } +- +- if (h != tabline_height()) +- shell_new_rows(); + } + + /* +--- 6327,6332 ---- +*************** +*** 6342,6348 **** + { + tabpage_T *tp; + int done; +- int h = tabline_height(); + + # ifdef FEAT_CMDWIN + if (cmdwin_type != 0) +--- 6338,6343 ---- +*************** +*** 6371,6379 **** + break; + } + } +- +- if (h != tabline_height()) +- shell_new_rows(); + } + + /* +--- 6366,6371 ---- +*************** +*** 6397,6402 **** +--- 6389,6396 ---- + /* + * Close tab page "tp", which is not the current tab page. + * Note that autocommands may make "tp" invalid. ++ * Also takes care of the tab pages line disappearing when closing the ++ * last-but-one tab page. + */ + void + tabpage_close_other(tp, forceit) +*************** +*** 6405,6410 **** +--- 6399,6405 ---- + { + int done = 0; + win_T *wp; ++ int h = tabline_height(); + + /* Limit to 1000 windows, autocommands may add a window while we close + * one. OK, so I'm paranoid... */ +*************** +*** 6418,6424 **** +--- 6413,6422 ---- + if (!valid_tabpage(tp) || tp->tp_firstwin == wp) + break; + } ++ + redraw_tabline = TRUE; ++ if (h != tabline_height()) ++ shell_new_rows(); + } + + /* +*** ../vim-7.0.096/src/version.c Sun Sep 10 13:56:06 2006 +--- src/version.c Sun Sep 10 15:44:24 2006 +*************** +*** 668,669 **** +--- 668,671 ---- + { /* Add new patch number below this line */ ++ /**/ ++ 97, + /**/ + +-- +Advice to worms: Sleep late. + + /// Bram Moolenaar -- Bram@Moolenaar.net -- http://www.Moolenaar.net \\\ +/// sponsor Vim, vote for features -- http://www.Vim.org/sponsor/ \\\ +\\\ download, build and distribute -- http://www.A-A-P.org /// + \\\ help me help AIDS victims -- http://ICCF-Holland.org /// --- vim-7.0.orig/upstream/patches/7.0.153 +++ vim-7.0/upstream/patches/7.0.153 @@ -0,0 +1,154 @@ +To: vim-dev@vim.org +Subject: Patch 7.0.153 +Fcc: outbox +From: Bram Moolenaar +Mime-Version: 1.0 +Content-Type: text/plain; charset=ISO-8859-1 +Content-Transfer-Encoding: 8bit +------------ + +Patch 7.0.153 +Problem: When using cscope and opening the temp file fails Vim crashes. + (Kaya Bekiroglu) +Solution: Check for NULL pointer returned from mch_open(). +Files: src/if_cscope.c + + +*** ../vim-7.0.152/src/if_cscope.c Tue Aug 29 17:28:56 2006 +--- src/if_cscope.c Mon Oct 30 22:26:01 2006 +*************** +*** 1100,1137 **** + if (qfpos != NULL && *qfpos != '0' && totmatches > 0) + { + /* fill error list */ +! FILE *f; +! char_u *tmp = vim_tempname('c'); + qf_info_T *qi = NULL; + win_T *wp = NULL; + + f = mch_fopen((char *)tmp, "w"); +! cs_file_results(f, nummatches); +! fclose(f); +! if (use_ll) /* Use location list */ +! wp = curwin; +! /* '-' starts a new error list */ +! if (qf_init(wp, tmp, (char_u *)"%f%*\\t%l%*\\t%m", *qfpos == '-') > 0) + { +! # ifdef FEAT_WINDOWS +! if (postponed_split != 0) + { +! win_split(postponed_split > 0 ? postponed_split : 0, + postponed_split_flags); + # ifdef FEAT_SCROLLBIND +! curwin->w_p_scb = FALSE; + # endif +! postponed_split = 0; +! } + # endif +! if (use_ll) +! /* +! * In the location list window, use the displayed location +! * list. Otherwise, use the location list for the window. +! */ +! qi = (bt_quickfix(wp->w_buffer) && wp->w_llist_ref != NULL) ? +! wp->w_llist_ref : wp->w_llist; +! qf_jump(qi, 0, 0, forceit); + } + mch_remove(tmp); + vim_free(tmp); +--- 1100,1143 ---- + if (qfpos != NULL && *qfpos != '0' && totmatches > 0) + { + /* fill error list */ +! FILE *f; +! char_u *tmp = vim_tempname('c'); + qf_info_T *qi = NULL; + win_T *wp = NULL; + + f = mch_fopen((char *)tmp, "w"); +! if (f == NULL) +! EMSG2(_(e_notopen), tmp); +! else + { +! cs_file_results(f, nummatches); +! fclose(f); +! if (use_ll) /* Use location list */ +! wp = curwin; +! /* '-' starts a new error list */ +! if (qf_init(wp, tmp, (char_u *)"%f%*\\t%l%*\\t%m", +! *qfpos == '-') > 0) + { +! # ifdef FEAT_WINDOWS +! if (postponed_split != 0) +! { +! win_split(postponed_split > 0 ? postponed_split : 0, + postponed_split_flags); + # ifdef FEAT_SCROLLBIND +! curwin->w_p_scb = FALSE; + # endif +! postponed_split = 0; +! } + # endif +! if (use_ll) +! /* +! * In the location list window, use the displayed location +! * list. Otherwise, use the location list for the window. +! */ +! qi = (bt_quickfix(wp->w_buffer) && wp->w_llist_ref != NULL) +! ? wp->w_llist_ref : wp->w_llist; +! qf_jump(qi, 0, 0, forceit); +! } + } + mch_remove(tmp); + vim_free(tmp); +*************** +*** 1723,1729 **** + continue; + + context = (char *)alloc((unsigned)strlen(cntx)+5); +! if (context==NULL) + continue; + + if (strcmp(cntx, "")==0) +--- 1729,1735 ---- + continue; + + context = (char *)alloc((unsigned)strlen(cntx)+5); +! if (context == NULL) + continue; + + if (strcmp(cntx, "")==0) +*************** +*** 1731,1737 **** + else + sprintf(context, "<<%s>>", cntx); + +! if (search==NULL) + fprintf(f, "%s\t%s\t%s\n", fullname, slno, context); + else + fprintf(f, "%s\t%s\t%s %s\n", fullname, slno, context, search); +--- 1737,1743 ---- + else + sprintf(context, "<<%s>>", cntx); + +! if (search == NULL) + fprintf(f, "%s\t%s\t%s\n", fullname, slno, context); + else + fprintf(f, "%s\t%s\t%s %s\n", fullname, slno, context, search); +*** ../vim-7.0.152/src/version.c Tue Oct 24 22:31:51 2006 +--- src/version.c Mon Oct 30 22:29:45 2006 +*************** +*** 668,669 **** +--- 668,671 ---- + { /* Add new patch number below this line */ ++ /**/ ++ 153, + /**/ + +-- +You cannot have a baby in one month by getting nine women pregnant. + + /// Bram Moolenaar -- Bram@Moolenaar.net -- http://www.Moolenaar.net \\\ +/// sponsor Vim, vote for features -- http://www.Vim.org/sponsor/ \\\ +\\\ download, build and distribute -- http://www.A-A-P.org /// + \\\ help me help AIDS victims -- http://ICCF-Holland.org /// --- vim-7.0.orig/upstream/patches/7.0.077 +++ vim-7.0/upstream/patches/7.0.077 @@ -0,0 +1,98 @@ +To: vim-dev@vim.org +Subject: Patch 7.0.077 +Fcc: outbox +From: Bram Moolenaar +Mime-Version: 1.0 +Content-Type: text/plain; charset=ISO-8859-1 +Content-Transfer-Encoding: 8bit +------------ + +Patch 7.0.077 +Problem: ":unlet v:this_session" causes a crash. (Marius Roets) +Solution: When trying to unlet a fixed variable give an error message. +Files: src/eval.c + + +*** ../vim-7.0.076/src/eval.c Tue Aug 29 21:59:25 2006 +--- src/eval.c Sat Sep 2 13:43:20 2006 +*************** +*** 701,706 **** +--- 701,707 ---- + static void list_one_var_a __ARGS((char_u *prefix, char_u *name, int type, char_u *string)); + static void set_var __ARGS((char_u *name, typval_T *varp, int copy)); + static int var_check_ro __ARGS((int flags, char_u *name)); ++ static int var_check_fixed __ARGS((int flags, char_u *name)); + static int tv_check_lock __ARGS((int lock, char_u *name)); + static void copy_tv __ARGS((typval_T *from, typval_T *to)); + static int item_copy __ARGS((typval_T *from, typval_T *to, int deep, int copyID)); +*************** +*** 3364,3369 **** +--- 3365,3372 ---- + hi = hash_find(ht, varname); + if (!HASHITEM_EMPTY(hi)) + { ++ if (var_check_fixed(HI2DI(hi)->di_flags, name)) ++ return FAIL; + if (var_check_ro(HI2DI(hi)->di_flags, name)) + return FAIL; + delete_var(ht, hi); +*************** +*** 17818,17824 **** + } + + /* +! * Return TRUE if di_flags "flags" indicate read-only variable "name". + * Also give an error message. + */ + static int +--- 17821,17827 ---- + } + + /* +! * Return TRUE if di_flags "flags" indicates variable "name" is read-only. + * Also give an error message. + */ + static int +*************** +*** 17834,17839 **** +--- 17837,17859 ---- + if ((flags & DI_FLAGS_RO_SBX) && sandbox) + { + EMSG2(_(e_readonlysbx), name); ++ return TRUE; ++ } ++ return FALSE; ++ } ++ ++ /* ++ * Return TRUE if di_flags "flags" indicates variable "name" is fixed. ++ * Also give an error message. ++ */ ++ static int ++ var_check_fixed(flags, name) ++ int flags; ++ char_u *name; ++ { ++ if (flags & DI_FLAGS_FIX) ++ { ++ EMSG2(_("E795: Cannot delete variable %s"), name); + return TRUE; + } + return FALSE; +*** ../vim-7.0.076/src/version.c Tue Aug 29 22:35:11 2006 +--- src/version.c Sat Sep 2 13:39:36 2006 +*************** +*** 668,669 **** +--- 668,671 ---- + { /* Add new patch number below this line */ ++ /**/ ++ 77, + /**/ + +-- + ### Hiroshima 45, Chernobyl 86, Windows 95 ### + + /// Bram Moolenaar -- Bram@Moolenaar.net -- http://www.Moolenaar.net \\\ +/// sponsor Vim, vote for features -- http://www.Vim.org/sponsor/ \\\ +\\\ download, build and distribute -- http://www.A-A-P.org /// + \\\ help me help AIDS victims -- http://ICCF-Holland.org /// --- vim-7.0.orig/upstream/patches/7.0.160 +++ vim-7.0/upstream/patches/7.0.160 @@ -0,0 +1,309 @@ +To: vim-dev@vim.org +Subject: Patch 7.0.160 +Fcc: outbox +From: Bram Moolenaar +Mime-Version: 1.0 +Content-Type: text/plain; charset=ISO-8859-1 +Content-Transfer-Encoding: 8bit +------------ + +Patch 7.0.160 +Problem: ":@a" echoes the command, Vi doesn't do that. +Solution: Set the silent flag in the typeahead buffer to avoid echoing the + command. +Files: src/ex_docmd.c, src/normal.c, src/ops.c, src/proto/ops.pro + + +*** ../vim-7.0.159/src/ex_docmd.c Tue Oct 24 13:02:27 2006 +--- src/ex_docmd.c Tue Nov 7 17:42:52 2006 +*************** +*** 8219,8226 **** + c = *eap->arg; + if (c == NUL || (c == '*' && *eap->cmd == '*')) + c = '@'; +! /* put the register in mapbuf */ +! if (do_execreg(c, TRUE, vim_strchr(p_cpo, CPO_EXECBUF) != NULL) == FAIL) + { + beep_flush(); + } +--- 8219,8227 ---- + c = *eap->arg; + if (c == NUL || (c == '*' && *eap->cmd == '*')) + c = '@'; +! /* Put the register in the typeahead buffer with the "silent" flag. */ +! if (do_execreg(c, TRUE, vim_strchr(p_cpo, CPO_EXECBUF) != NULL, TRUE) +! == FAIL) + { + beep_flush(); + } +*** ../vim-7.0.159/src/normal.c Tue Oct 17 22:40:14 2006 +--- src/normal.c Tue Nov 7 17:42:59 2006 +*************** +*** 8860,8866 **** + #endif + while (cap->count1-- && !got_int) + { +! if (do_execreg(cap->nchar, FALSE, FALSE) == FAIL) + { + clearopbeep(cap->oap); + break; +--- 8860,8866 ---- + #endif + while (cap->count1-- && !got_int) + { +! if (do_execreg(cap->nchar, FALSE, FALSE, FALSE) == FAIL) + { + clearopbeep(cap->oap); + break; +*** ../vim-7.0.159/src/ops.c Tue Oct 17 16:26:52 2006 +--- src/ops.c Tue Nov 7 17:52:30 2006 +*************** +*** 95,102 **** + static void block_insert __ARGS((oparg_T *oap, char_u *s, int b_insert, struct block_def*bdp)); + #endif + static int stuff_yank __ARGS((int, char_u *)); +! static void put_reedit_in_typebuf __ARGS((void)); +! static int put_in_typebuf __ARGS((char_u *s, int colon)); + static void stuffescaped __ARGS((char_u *arg, int literally)); + #ifdef FEAT_MBYTE + static void mb_adjust_opend __ARGS((oparg_T *oap)); +--- 95,102 ---- + static void block_insert __ARGS((oparg_T *oap, char_u *s, int b_insert, struct block_def*bdp)); + #endif + static int stuff_yank __ARGS((int, char_u *)); +! static void put_reedit_in_typebuf __ARGS((int silent)); +! static int put_in_typebuf __ARGS((char_u *s, int colon, int silent)); + static void stuffescaped __ARGS((char_u *arg, int literally)); + #ifdef FEAT_MBYTE + static void mb_adjust_opend __ARGS((oparg_T *oap)); +*************** +*** 1120,1129 **** + * return FAIL for failure, OK otherwise + */ + int +! do_execreg(regname, colon, addcr) + int regname; + int colon; /* insert ':' before each line */ + int addcr; /* always add '\n' to end of line */ + { + static int lastc = NUL; + long i; +--- 1120,1130 ---- + * return FAIL for failure, OK otherwise + */ + int +! do_execreg(regname, colon, addcr, silent) + int regname; + int colon; /* insert ':' before each line */ + int addcr; /* always add '\n' to end of line */ ++ int silent; /* set "silent" flag in typeahead buffer */ + { + static int lastc = NUL; + long i; +*************** +*** 1173,1181 **** + /* When in Visual mode "'<,'>" will be prepended to the command. + * Remove it when it's already there. */ + if (VIsual_active && STRNCMP(p, "'<,'>", 5) == 0) +! retval = put_in_typebuf(p + 5, TRUE); + else +! retval = put_in_typebuf(p, TRUE); + } + vim_free(p); + } +--- 1174,1182 ---- + /* When in Visual mode "'<,'>" will be prepended to the command. + * Remove it when it's already there. */ + if (VIsual_active && STRNCMP(p, "'<,'>", 5) == 0) +! retval = put_in_typebuf(p + 5, TRUE, silent); + else +! retval = put_in_typebuf(p, TRUE, silent); + } + vim_free(p); + } +*************** +*** 1186,1192 **** + p = get_expr_line(); + if (p == NULL) + return FAIL; +! retval = put_in_typebuf(p, colon); + vim_free(p); + } + #endif +--- 1187,1193 ---- + p = get_expr_line(); + if (p == NULL) + return FAIL; +! retval = put_in_typebuf(p, colon, silent); + vim_free(p); + } + #endif +*************** +*** 1198,1204 **** + EMSG(_(e_noinstext)); + return FAIL; + } +! retval = put_in_typebuf(p, colon); + vim_free(p); + } + else +--- 1199,1205 ---- + EMSG(_(e_noinstext)); + return FAIL; + } +! retval = put_in_typebuf(p, colon, silent); + vim_free(p); + } + else +*************** +*** 1213,1232 **** + /* + * Insert lines into typeahead buffer, from last one to first one. + */ +! put_reedit_in_typebuf(); + for (i = y_current->y_size; --i >= 0; ) + { + /* insert NL between lines and after last line if type is MLINE */ + if (y_current->y_type == MLINE || i < y_current->y_size - 1 + || addcr) + { +! if (ins_typebuf((char_u *)"\n", remap, 0, TRUE, FALSE) == FAIL) + return FAIL; + } +! if (ins_typebuf(y_current->y_array[i], remap, 0, TRUE, FALSE) + == FAIL) + return FAIL; +! if (colon && ins_typebuf((char_u *)":", remap, 0, TRUE, FALSE) + == FAIL) + return FAIL; + } +--- 1214,1233 ---- + /* + * Insert lines into typeahead buffer, from last one to first one. + */ +! put_reedit_in_typebuf(silent); + for (i = y_current->y_size; --i >= 0; ) + { + /* insert NL between lines and after last line if type is MLINE */ + if (y_current->y_type == MLINE || i < y_current->y_size - 1 + || addcr) + { +! if (ins_typebuf((char_u *)"\n", remap, 0, TRUE, silent) == FAIL) + return FAIL; + } +! if (ins_typebuf(y_current->y_array[i], remap, 0, TRUE, silent) + == FAIL) + return FAIL; +! if (colon && ins_typebuf((char_u *)":", remap, 0, TRUE, silent) + == FAIL) + return FAIL; + } +*************** +*** 1240,1246 **** + * used only after other typeahead has been processed. + */ + static void +! put_reedit_in_typebuf() + { + char_u buf[3]; + +--- 1241,1248 ---- + * used only after other typeahead has been processed. + */ + static void +! put_reedit_in_typebuf(silent) +! int silent; + { + char_u buf[3]; + +*************** +*** 1257,1281 **** + buf[0] = restart_edit == 'I' ? 'i' : restart_edit; + buf[1] = NUL; + } +! if (ins_typebuf(buf, REMAP_NONE, 0, TRUE, FALSE) == OK) + restart_edit = NUL; + } + } + + static int +! put_in_typebuf(s, colon) + char_u *s; + int colon; /* add ':' before the line */ + { + int retval = OK; + +! put_reedit_in_typebuf(); + if (colon) +! retval = ins_typebuf((char_u *)"\n", REMAP_YES, 0, TRUE, FALSE); + if (retval == OK) +! retval = ins_typebuf(s, REMAP_YES, 0, TRUE, FALSE); + if (colon && retval == OK) +! retval = ins_typebuf((char_u *)":", REMAP_YES, 0, TRUE, FALSE); + return retval; + } + +--- 1259,1284 ---- + buf[0] = restart_edit == 'I' ? 'i' : restart_edit; + buf[1] = NUL; + } +! if (ins_typebuf(buf, REMAP_NONE, 0, TRUE, silent) == OK) + restart_edit = NUL; + } + } + + static int +! put_in_typebuf(s, colon, silent) + char_u *s; + int colon; /* add ':' before the line */ ++ int silent; + { + int retval = OK; + +! put_reedit_in_typebuf(silent); + if (colon) +! retval = ins_typebuf((char_u *)"\n", REMAP_YES, 0, TRUE, silent); + if (retval == OK) +! retval = ins_typebuf(s, REMAP_YES, 0, TRUE, silent); + if (colon && retval == OK) +! retval = ins_typebuf((char_u *)":", REMAP_YES, 0, TRUE, silent); + return retval; + } + +*** ../vim-7.0.159/src/proto/ops.pro Tue Oct 17 16:26:52 2006 +--- src/proto/ops.pro Tue Nov 7 18:08:35 2006 +*************** +*** 17,23 **** + extern void put_register __ARGS((int name, void *reg)); + extern int yank_register_mline __ARGS((int regname)); + extern int do_record __ARGS((int c)); +! extern int do_execreg __ARGS((int regname, int colon, int addcr)); + extern int insert_reg __ARGS((int regname, int literally)); + extern int get_spec_reg __ARGS((int regname, char_u **argp, int *allocated, int errmsg)); + extern int cmdline_paste_reg __ARGS((int regname, int literally, int remcr)); +--- 17,23 ---- + extern void put_register __ARGS((int name, void *reg)); + extern int yank_register_mline __ARGS((int regname)); + extern int do_record __ARGS((int c)); +! extern int do_execreg __ARGS((int regname, int colon, int addcr, int silent)); + extern int insert_reg __ARGS((int regname, int literally)); + extern int get_spec_reg __ARGS((int regname, char_u **argp, int *allocated, int errmsg)); + extern int cmdline_paste_reg __ARGS((int regname, int literally, int remcr)); +*** ../vim-7.0.159/src/version.c Tue Nov 7 18:02:19 2006 +--- src/version.c Tue Nov 7 18:05:36 2006 +*************** +*** 668,669 **** +--- 668,671 ---- + { /* Add new patch number below this line */ ++ /**/ ++ 160, + /**/ + +-- +hundred-and-one symptoms of being an internet addict: +172. You join listservers just for the extra e-mail. + + /// Bram Moolenaar -- Bram@Moolenaar.net -- http://www.Moolenaar.net \\\ +/// sponsor Vim, vote for features -- http://www.Vim.org/sponsor/ \\\ +\\\ download, build and distribute -- http://www.A-A-P.org /// + \\\ help me help AIDS victims -- http://ICCF-Holland.org /// --- vim-7.0.orig/upstream/patches/7.0.122 +++ vim-7.0/upstream/patches/7.0.122 @@ -0,0 +1,92 @@ +To: vim-dev@vim.org +Subject: Patch 7.0.122 +Fcc: outbox +From: Bram Moolenaar +Mime-Version: 1.0 +Content-Type: text/plain; charset=ISO-8859-1 +Content-Transfer-Encoding: 8bit +------------ + +Patch 7.0.122 +Problem: GUI: When clearing after a bold, double-wide character half a + character may be drawn. +Solution: Check for double-wide character and redraw it. (Yukihiro Nakadaira) +Files: src/screen.c + + +*** ../vim-7.0.121/src/screen.c Thu Sep 14 21:04:09 2006 +--- src/screen.c Sat Oct 7 15:13:43 2006 +*************** +*** 5079,5093 **** + * character too. If we didn't skip any blanks above, then we + * only redraw if the character wasn't already redrawn anyway. + */ +! if (gui.in_use && (col > startCol || !redraw_this) +! # ifdef FEAT_MBYTE +! && enc_dbcs == 0 +! # endif +! ) + { + hl = ScreenAttrs[off_to]; + if (hl > HL_ALL || (hl & HL_BOLD)) +! screen_char(off_to - 1, row, col + coloff - 1); + } + #endif + screen_fill(row, row + 1, col + coloff, clear_width + coloff, +--- 5079,5116 ---- + * character too. If we didn't skip any blanks above, then we + * only redraw if the character wasn't already redrawn anyway. + */ +! if (gui.in_use && (col > startCol || !redraw_this)) + { + hl = ScreenAttrs[off_to]; + if (hl > HL_ALL || (hl & HL_BOLD)) +! { +! int prev_cells = 1; +! # ifdef FEAT_MBYTE +! if (enc_utf8) +! /* for utf-8, ScreenLines[char_offset + 1] == 0 means +! * that its width is 2. */ +! prev_cells = ScreenLines[off_to - 1] == 0 ? 2 : 1; +! else if (enc_dbcs != 0) +! { +! /* find previous character by counting from first +! * column and get its width. */ +! unsigned off = LineOffset[row]; +! +! while (off < off_to) +! { +! prev_cells = (*mb_off2cells)(off); +! off += prev_cells; +! } +! } +! +! if (enc_dbcs != 0 && prev_cells > 1) +! screen_char_2(off_to - prev_cells, row, +! col + coloff - prev_cells); +! else +! # endif +! screen_char(off_to - prev_cells, row, +! col + coloff - prev_cells); +! } + } + #endif + screen_fill(row, row + 1, col + coloff, clear_width + coloff, +*** ../vim-7.0.121/src/version.c Sun Oct 8 13:56:53 2006 +--- src/version.c Mon Oct 9 22:10:17 2006 +*************** +*** 668,669 **** +--- 668,671 ---- + { /* Add new patch number below this line */ ++ /**/ ++ 122, + /**/ + +-- +How To Keep A Healthy Level Of Insanity: +7. Finish all your sentences with "in accordance with the prophecy". + + /// Bram Moolenaar -- Bram@Moolenaar.net -- http://www.Moolenaar.net \\\ +/// sponsor Vim, vote for features -- http://www.Vim.org/sponsor/ \\\ +\\\ download, build and distribute -- http://www.A-A-P.org /// + \\\ help me help AIDS victims -- http://ICCF-Holland.org /// --- vim-7.0.orig/upstream/patches/7.0.086 +++ vim-7.0/upstream/patches/7.0.086 @@ -0,0 +1,57 @@ +To: vim-dev@vim.org +Subject: Patch 7.0.086 +Fcc: outbox +From: Bram Moolenaar +Mime-Version: 1.0 +Content-Type: text/plain; charset=ISO-8859-1 +Content-Transfer-Encoding: 8bit +------------ + +Patch 7.0.086 +Problem: getqflist() returns entries for pattern and text with the number + zero. Passing these to setqflist() results in the string "0". +Solution: Use an empty string instead of the number zero. +Files: src/quickfix.c + + +*** ../vim-7.0.085/src/quickfix.c Tue Aug 29 17:28:56 2006 +--- src/quickfix.c Mon Sep 4 20:18:48 2006 +*************** +*** 3426,3433 **** + || dict_add_nr_str(dict, "col", (long)qfp->qf_col, NULL) == FAIL + || dict_add_nr_str(dict, "vcol", (long)qfp->qf_viscol, NULL) == FAIL + || dict_add_nr_str(dict, "nr", (long)qfp->qf_nr, NULL) == FAIL +! || dict_add_nr_str(dict, "pattern", 0L, qfp->qf_pattern) == FAIL +! || dict_add_nr_str(dict, "text", 0L, qfp->qf_text) == FAIL + || dict_add_nr_str(dict, "type", 0L, buf) == FAIL + || dict_add_nr_str(dict, "valid", (long)qfp->qf_valid, NULL) == FAIL) + return FAIL; +--- 3426,3435 ---- + || dict_add_nr_str(dict, "col", (long)qfp->qf_col, NULL) == FAIL + || dict_add_nr_str(dict, "vcol", (long)qfp->qf_viscol, NULL) == FAIL + || dict_add_nr_str(dict, "nr", (long)qfp->qf_nr, NULL) == FAIL +! || dict_add_nr_str(dict, "pattern", 0L, +! qfp->qf_pattern == NULL ? (char_u *)"" : qfp->qf_pattern) == FAIL +! || dict_add_nr_str(dict, "text", 0L, +! qfp->qf_text == NULL ? (char_u *)"" : qfp->qf_text) == FAIL + || dict_add_nr_str(dict, "type", 0L, buf) == FAIL + || dict_add_nr_str(dict, "valid", (long)qfp->qf_valid, NULL) == FAIL) + return FAIL; +*** ../vim-7.0.085/src/version.c Tue Sep 5 13:34:30 2006 +--- src/version.c Tue Sep 5 15:35:40 2006 +*************** +*** 668,669 **** +--- 668,671 ---- + { /* Add new patch number below this line */ ++ /**/ ++ 86, + /**/ + +-- +A vacation is a period of travel during which you find that you +took twice as many clothes and half as much money as you needed. + + /// Bram Moolenaar -- Bram@Moolenaar.net -- http://www.Moolenaar.net \\\ +/// sponsor Vim, vote for features -- http://www.Vim.org/sponsor/ \\\ +\\\ download, build and distribute -- http://www.A-A-P.org /// + \\\ help me help AIDS victims -- http://ICCF-Holland.org /// --- vim-7.0.orig/upstream/patches/7.0.039 +++ vim-7.0/upstream/patches/7.0.039 @@ -0,0 +1,129 @@ +To: vim-dev@vim.org +Subject: Patch 7.0.039 +Fcc: outbox +From: Bram Moolenaar +Mime-Version: 1.0 +Content-Type: text/plain; charset=ISO-8859-1 +Content-Transfer-Encoding: 8bit +------------ + +Patch 7.0.039 +Problem: Calling inputdialog() with a third argument in the console doesn't + work. +Solution: Make a separate function for input() and inputdialog(). (Yegappan + Lakshmanan) +Files: src/eval.c + + +*** ../vim-7.0.038/src/eval.c Wed Jul 12 21:48:56 2006 +--- src/eval.c Mon Jul 10 23:03:13 2006 +*************** +*** 11321,11334 **** + + static int inputsecret_flag = 0; + + /* +! * "input()" function +! * Also handles inputsecret() when inputsecret is set. + */ + static void +! f_input(argvars, rettv) + typval_T *argvars; + typval_T *rettv; + { + char_u *prompt = get_tv_string_chk(&argvars[0]); + char_u *p = NULL; +--- 11321,11339 ---- + + static int inputsecret_flag = 0; + ++ static void get_user_input __ARGS((typval_T *argvars, typval_T *rettv, int inputdialog)); ++ + /* +! * This function is used by f_input() and f_inputdialog() functions. The third +! * argument to f_input() specifies the type of completion to use at the +! * prompt. The third argument to f_inputdialog() specifies the value to return +! * when the user cancels the prompt. + */ + static void +! get_user_input(argvars, rettv, inputdialog) + typval_T *argvars; + typval_T *rettv; ++ int inputdialog; + { + char_u *prompt = get_tv_string_chk(&argvars[0]); + char_u *p = NULL; +*************** +*** 11378,11384 **** + if (defstr != NULL) + stuffReadbuffSpec(defstr); + +! if (argvars[2].v_type != VAR_UNKNOWN) + { + char_u *xp_name; + int xp_namelen; +--- 11383,11389 ---- + if (defstr != NULL) + stuffReadbuffSpec(defstr); + +! if (!inputdialog && argvars[2].v_type != VAR_UNKNOWN) + { + char_u *xp_name; + int xp_namelen; +*************** +*** 11413,11418 **** +--- 11418,11435 ---- + } + + /* ++ * "input()" function ++ * Also handles inputsecret() when inputsecret is set. ++ */ ++ static void ++ f_input(argvars, rettv) ++ typval_T *argvars; ++ typval_T *rettv; ++ { ++ get_user_input(argvars, rettv, FALSE); ++ } ++ ++ /* + * "inputdialog()" function + */ + static void +*************** +*** 11452,11458 **** + } + else + #endif +! f_input(argvars, rettv); + } + + /* +--- 11469,11475 ---- + } + else + #endif +! get_user_input(argvars, rettv, TRUE); + } + + /* +*** ../vim-7.0.038/src/version.c Wed Jul 12 21:48:56 2006 +--- src/version.c Wed Jul 12 21:56:30 2006 +*************** +*** 668,669 **** +--- 668,671 ---- + { /* Add new patch number below this line */ ++ /**/ ++ 39, + /**/ + +-- +A consultant is a person who takes your money and annoys your employees while +tirelessly searching for the best way to extend the consulting contract. + (Scott Adams - The Dilbert principle) + + /// Bram Moolenaar -- Bram@Moolenaar.net -- http://www.Moolenaar.net \\\ +/// sponsor Vim, vote for features -- http://www.Vim.org/sponsor/ \\\ +\\\ download, build and distribute -- http://www.A-A-P.org /// + \\\ help me help AIDS victims -- http://ICCF-Holland.org /// --- vim-7.0.orig/upstream/patches/7.0.113 +++ vim-7.0/upstream/patches/7.0.113 @@ -0,0 +1,57 @@ +To: vim-dev@vim.org +Subject: Patch 7.0.113 +Fcc: outbox +From: Bram Moolenaar +Mime-Version: 1.0 +Content-Type: text/plain; charset=ISO-8859-1 +Content-Transfer-Encoding: 8bit +------------ + +Patch 7.0.113 +Problem: Using CTRL-L in Insert completion when there is no current match + may cause a crash. (Yukihiro Nakadaira) +Solution: Check for compl_leader to be NULL +Files: src/edit.c + + +*** ../vim-7.0.112/src/edit.c Thu Sep 14 11:07:08 2006 +--- src/edit.c Tue Oct 3 14:57:47 2006 +*************** +*** 3206,3212 **** + for (cp = compl_shown_match->cp_next; cp != NULL + && cp != compl_first_match; cp = cp->cp_next) + { +! if (ins_compl_equal(cp, compl_leader, + (int)STRLEN(compl_leader))) + { + p = cp->cp_str; +--- 3206,3213 ---- + for (cp = compl_shown_match->cp_next; cp != NULL + && cp != compl_first_match; cp = cp->cp_next) + { +! if (compl_leader == NULL +! || ins_compl_equal(cp, compl_leader, + (int)STRLEN(compl_leader))) + { + p = cp->cp_str; +*** ../vim-7.0.112/src/version.c Tue Oct 3 15:02:11 2006 +--- src/version.c Tue Oct 3 15:20:13 2006 +*************** +*** 668,669 **** +--- 668,671 ---- + { /* Add new patch number below this line */ ++ /**/ ++ 113, + /**/ + +-- +I recommend ordering large cargo containers of paper towels to make up +whatever budget underruns you have. Paper products are always useful and they +have the advantage of being completely flushable if you need to make room in +the storage area later. + (Scott Adams - The Dilbert principle) + + /// Bram Moolenaar -- Bram@Moolenaar.net -- http://www.Moolenaar.net \\\ +/// sponsor Vim, vote for features -- http://www.Vim.org/sponsor/ \\\ +\\\ download, build and distribute -- http://www.A-A-P.org /// + \\\ help me help AIDS victims -- http://ICCF-Holland.org /// --- vim-7.0.orig/upstream/patches/7.0.143 +++ vim-7.0/upstream/patches/7.0.143 @@ -0,0 +1,53 @@ +To: vim-dev@vim.org +Subject: Patch 7.0.143 +Fcc: outbox +From: Bram Moolenaar +Mime-Version: 1.0 +Content-Type: text/plain; charset=ISO-8859-1 +Content-Transfer-Encoding: 8bit +------------ + +Patch 7.0.143 +Problem: Setting 'scroll' to its default value was not handled correctly. +Solution: Compare the right field to PV_SCROLL. +Files: src/option.c + + +*** ../vim-7.0.142/src/option.c Tue Oct 10 18:43:50 2006 +--- src/option.c Tue Oct 17 17:29:09 2006 +*************** +*** 3405,3411 **** + } + else if (flags & P_NUM) + { +! if (varp == (char_u *)PV_SCROLL) + win_comp_scroll(curwin); + else + { +--- 3405,3411 ---- + } + else if (flags & P_NUM) + { +! if (options[opt_idx].indir == PV_SCROLL) + win_comp_scroll(curwin); + else + { +*** ../vim-7.0.142/src/version.c Tue Oct 17 16:55:47 2006 +--- src/version.c Tue Oct 17 18:34:53 2006 +*************** +*** 668,669 **** +--- 668,671 ---- + { /* Add new patch number below this line */ ++ /**/ ++ 143, + /**/ + +-- +hundred-and-one symptoms of being an internet addict: +56. You leave the modem speaker on after connecting because you think it + sounds like the ocean wind...the perfect soundtrack for "surfing the net". + + /// Bram Moolenaar -- Bram@Moolenaar.net -- http://www.Moolenaar.net \\\ +/// sponsor Vim, vote for features -- http://www.Vim.org/sponsor/ \\\ +\\\ download, build and distribute -- http://www.A-A-P.org /// + \\\ help me help AIDS victims -- http://ICCF-Holland.org /// --- vim-7.0.orig/upstream/patches/7.0.066 +++ vim-7.0/upstream/patches/7.0.066 @@ -0,0 +1,49 @@ +To: vim-dev@vim.org +Subject: Patch 7.0.066 +Fcc: outbox +From: Bram Moolenaar +Mime-Version: 1.0 +Content-Type: text/plain; charset=ISO-8859-1 +Content-Transfer-Encoding: 8bit +------------ + +Patch 7.0.066 +Problem: After the popup menu for Insert mode completion overlaps the tab + pages line it is not completely removed. +Solution: Redraw the tab pages line after removing the popup menu. (Ori + Avtalion) +Files: src/popupmnu.c + + +*** ../vim-7.0.065/src/popupmnu.c Fri Apr 21 00:12:29 2006 +--- src/popupmnu.c Tue Aug 22 16:10:55 2006 +*************** +*** 552,557 **** +--- 552,560 ---- + { + pum_array = NULL; + redraw_all_later(SOME_VALID); ++ #ifdef FEAT_WINDOWS ++ redraw_tabline = TRUE; ++ #endif + status_redraw_all(); + } + +*** ../vim-7.0.065/src/version.c Tue Aug 22 21:39:18 2006 +--- src/version.c Tue Aug 22 21:50:34 2006 +*************** +*** 668,669 **** +--- 668,671 ---- + { /* Add new patch number below this line */ ++ /**/ ++ 66, + /**/ + +-- +panic("Foooooooood fight!"); + -- In the kernel source aha1542.c, after detecting a bad segment list + + /// Bram Moolenaar -- Bram@Moolenaar.net -- http://www.Moolenaar.net \\\ +/// sponsor Vim, vote for features -- http://www.Vim.org/sponsor/ \\\ +\\\ download, build and distribute -- http://www.A-A-P.org /// + \\\ help me help AIDS victims -- http://ICCF-Holland.org /// --- vim-7.0.orig/upstream/patches/7.0.067 +++ vim-7.0/upstream/patches/7.0.067 @@ -0,0 +1,95 @@ +To: vim-dev@vim.org +Subject: Patch 7.0.067 +Fcc: outbox +From: Bram Moolenaar +Mime-Version: 1.0 +Content-Type: text/plain; charset=ISO-8859-1 +Content-Transfer-Encoding: 8bit +------------ + +Patch 7.0.067 +Problem: Undo doesn't always work properly when using "scim" input method. + Undo is split up when using preediting. +Solution: Reset xim_has_preediting also when preedit_start_col is not + MAXCOL. Don't split undo when is used while preediting. + (Yukihiro Nakadaira) +Files: src/edit.c, src/mbyte.c + + +*** ../vim-7.0.066/src/edit.c Tue Aug 22 19:58:22 2006 +--- src/edit.c Tue Aug 29 14:57:46 2006 +*************** +*** 8597,8603 **** + tpos = curwin->w_cursor; + if (oneleft() == OK) + { +! start_arrow(&tpos); + #ifdef FEAT_RIGHTLEFT + /* If exit reversed string, position is fixed */ + if (revins_scol != -1 && (int)curwin->w_cursor.col >= revins_scol) +--- 8597,8608 ---- + tpos = curwin->w_cursor; + if (oneleft() == OK) + { +! #if defined(FEAT_XIM) && defined(FEAT_GUI_GTK) +! /* Only call start_arrow() when not busy with preediting, it will +! * break undo. K_LEFT is inserted in im_correct_cursor(). */ +! if (!im_is_preediting()) +! #endif +! start_arrow(&tpos); + #ifdef FEAT_RIGHTLEFT + /* If exit reversed string, position is fixed */ + if (revins_scol != -1 && (int)curwin->w_cursor.col >= revins_scol) +*** ../vim-7.0.066/src/mbyte.c Wed Aug 16 18:05:36 2006 +--- src/mbyte.c Tue Aug 29 14:41:45 2006 +*************** +*** 3514,3519 **** +--- 3514,3524 ---- + add_to_input_buf(delkey, (int)sizeof(delkey)); + } + ++ /* ++ * Move the cursor left by "num_move_back" characters. ++ * Note that ins_left() checks im_is_preediting() to avoid breaking undo for ++ * these K_LEFT keys. ++ */ + static void + im_correct_cursor(int num_move_back) + { +*************** +*** 3741,3748 **** + } + else if (cursor_index == 0 && preedit_string[0] == '\0') + { +! if (preedit_start_col == MAXCOL) +! xim_has_preediting = FALSE; + + /* If at the start position (after typing backspace) + * preedit_start_col must be reset. */ +--- 3746,3752 ---- + } + else if (cursor_index == 0 && preedit_string[0] == '\0') + { +! xim_has_preediting = FALSE; + + /* If at the start position (after typing backspace) + * preedit_start_col must be reset. */ +*** ../vim-7.0.066/src/version.c Tue Aug 22 21:51:18 2006 +--- src/version.c Tue Aug 29 16:09:35 2006 +*************** +*** 668,669 **** +--- 668,671 ---- + { /* Add new patch number below this line */ ++ /**/ ++ 67, + /**/ + +-- +hundred-and-one symptoms of being an internet addict: +265. Your reason for not staying in touch with family is that + they do not have e-mail addresses. + + /// Bram Moolenaar -- Bram@Moolenaar.net -- http://www.Moolenaar.net \\\ +/// sponsor Vim, vote for features -- http://www.Vim.org/sponsor/ \\\ +\\\ download, build and distribute -- http://www.A-A-P.org /// + \\\ help me help AIDS victims -- http://ICCF-Holland.org /// --- vim-7.0.orig/upstream/patches/7.0.146 +++ vim-7.0/upstream/patches/7.0.146 @@ -0,0 +1,137 @@ +To: vim-dev@vim.org +Subject: Patch 7.0.146 +Fcc: outbox +From: Bram Moolenaar +Mime-Version: 1.0 +Content-Type: text/plain; charset=ISO-8859-1 +Content-Transfer-Encoding: 8bit +------------ + +Patch 7.0.146 +Problem: When 'switchbuf' is set to "usetab" and the current tab has only a + quickfix window, jumping to an error always opens a new window. + Also, when the buffer is open in another tab page it's not found. +Solution: Check for the "split" value of 'switchbuf' properly. Search in + other tab pages for the desired buffer. (Yegappan Lakshmanan) +Files: src/buffer.c, src/quickfix.c + + +*** ../vim-7.0.145/src/buffer.c Sat Sep 9 14:51:43 2006 +--- src/buffer.c Fri Oct 20 20:08:49 2006 +*************** +*** 1208,1218 **** + { + # ifdef FEAT_WINDOWS + /* jump to first window containing buf if one exists ("useopen") */ +! if (vim_strchr(p_swb, 'o') && buf_jump_open_win(buf)) + return OK; + /* jump to first window in any tab page containing buf if one exists + * ("usetab") */ +! if (vim_strchr(p_swb, 'a') && buf_jump_open_tab(buf)) + return OK; + if (win_split(0, 0) == FAIL) + # endif +--- 1208,1218 ---- + { + # ifdef FEAT_WINDOWS + /* jump to first window containing buf if one exists ("useopen") */ +! if (vim_strchr(p_swb, 'o') != NULL && buf_jump_open_win(buf)) + return OK; + /* jump to first window in any tab page containing buf if one exists + * ("usetab") */ +! if (vim_strchr(p_swb, 'a') != NULL && buf_jump_open_tab(buf)) + return OK; + if (win_split(0, 0) == FAIL) + # endif +*************** +*** 1842,1854 **** + if (options & GETF_SWITCH) + { + /* use existing open window for buffer if wanted */ +! if (vim_strchr(p_swb, 'o')) /* useopen */ + wp = buf_jump_open_win(buf); + /* use existing open window in any tab page for buffer if wanted */ +! if (vim_strchr(p_swb, 'a')) /* usetab */ + wp = buf_jump_open_tab(buf); + /* split window if wanted ("split") */ +! if (wp == NULL && vim_strchr(p_swb, 't') && !bufempty()) + { + if (win_split(0, 0) == FAIL) + return FAIL; +--- 1842,1854 ---- + if (options & GETF_SWITCH) + { + /* use existing open window for buffer if wanted */ +! if (vim_strchr(p_swb, 'o') != NULL) /* useopen */ + wp = buf_jump_open_win(buf); + /* use existing open window in any tab page for buffer if wanted */ +! if (vim_strchr(p_swb, 'a') != NULL) /* usetab */ + wp = buf_jump_open_tab(buf); + /* split window if wanted ("split") */ +! if (wp == NULL && vim_strchr(p_swb, 'l') != NULL && !bufempty()) + { + if (win_split(0, 0) == FAIL) + return FAIL; +*** ../vim-7.0.145/src/quickfix.c Tue Sep 5 15:36:30 2006 +--- src/quickfix.c Fri Oct 20 20:05:00 2006 +*************** +*** 1586,1595 **** + } + + /* +! * If there is only one window, create a new one above the quickfix +! * window. + */ +! if (firstwin == lastwin || !usable_win) + { + ll_ref = curwin->w_llist_ref; + +--- 1586,1615 ---- + } + + /* +! * If no usable window is found and 'switchbuf' is set to 'usetab' +! * then search in other tabs. + */ +! if (!usable_win && vim_strchr(p_swb, 'a') != NULL) +! { +! tabpage_T *tp; +! win_T *wp; +! +! FOR_ALL_TAB_WINDOWS(tp, wp) +! { +! if (wp->w_buffer->b_fnum == qf_ptr->qf_fnum) +! { +! goto_tabpage_win(tp, wp); +! usable_win = 1; +! break; +! } +! } +! } +! +! /* +! * If there is only one window and is the quickfix window, create a new +! * one above the quickfix window. +! */ +! if (((firstwin == lastwin) && bt_quickfix(curbuf)) || !usable_win) + { + ll_ref = curwin->w_llist_ref; + +*** ../vim-7.0.145/src/version.c Tue Oct 17 22:40:14 2006 +--- src/version.c Fri Oct 20 20:11:58 2006 +*************** +*** 668,669 **** +--- 668,671 ---- + { /* Add new patch number below this line */ ++ /**/ ++ 146, + /**/ + +-- +hundred-and-one symptoms of being an internet addict: +80. At parties, you introduce your spouse as your "service provider." + + /// Bram Moolenaar -- Bram@Moolenaar.net -- http://www.Moolenaar.net \\\ +/// sponsor Vim, vote for features -- http://www.Vim.org/sponsor/ \\\ +\\\ download, build and distribute -- http://www.A-A-P.org /// + \\\ help me help AIDS victims -- http://ICCF-Holland.org /// --- vim-7.0.orig/upstream/patches/7.0.045 +++ vim-7.0/upstream/patches/7.0.045 @@ -0,0 +1,67 @@ +To: vim-dev@vim.org +Subject: Patch 7.0.045 (extra) +Fcc: outbox +From: Bram Moolenaar +Mime-Version: 1.0 +Content-Type: text/plain; charset=ISO-8859-1 +Content-Transfer-Encoding: 8bit +------------ + +Patch 7.0.045 (extra) +Problem: Win32: Warnings when compiling OLE version with MSVC 2005. +Solution: Move including vim.h to before windows.h. (Ilya Bobir) +Files: src/if_ole.cpp + + +*** ../vim-7.0.044/src/if_ole.cpp Wed May 3 23:18:50 2006 +--- src/if_ole.cpp Sat Jun 24 13:36:52 2006 +*************** +*** 13,23 **** + * See os_mswin.c for the client side. + */ + + #include + #include + + extern "C" { +- #include "vim.h" + extern HWND s_hwnd; + extern HWND vim_parent_hwnd; + } +--- 13,26 ---- + * See os_mswin.c for the client side. + */ + ++ extern "C" { ++ #include "vim.h" ++ } ++ + #include + #include + + extern "C" { + extern HWND s_hwnd; + extern HWND vim_parent_hwnd; + } +*** ../vim-7.0.044/src/version.c Tue Aug 8 16:47:38 2006 +--- src/version.c Tue Aug 8 17:04:14 2006 +*************** +*** 668,669 **** +--- 668,671 ---- + { /* Add new patch number below this line */ ++ /**/ ++ 45, + /**/ + +-- +From "know your smileys": + % Bike accident. A bit far-fetched, I suppose; although... + o _ _ _ + _o /\_ _ \\o (_)\__/o (_) + _< \_ _>(_) (_)/<_ \_| \ _|/' \/ + (_)>(_) (_) (_) (_) (_)' _\o_ + + /// Bram Moolenaar -- Bram@Moolenaar.net -- http://www.Moolenaar.net \\\ +/// sponsor Vim, vote for features -- http://www.Vim.org/sponsor/ \\\ +\\\ download, build and distribute -- http://www.A-A-P.org /// + \\\ help me help AIDS victims -- http://ICCF-Holland.org /// --- vim-7.0.orig/upstream/patches/7.0.159 +++ vim-7.0/upstream/patches/7.0.159 @@ -0,0 +1,80 @@ +To: vim-dev@vim.org +Subject: Patch 7.0.159 +Fcc: outbox +From: Bram Moolenaar +Mime-Version: 1.0 +Content-Type: text/plain; charset=ISO-8859-1 +Content-Transfer-Encoding: 8bit +------------ + +Patch 7.0.159 +Problem: When there is an I/O error in the swap file the cause of the error + cannot be seen. +Solution: Use PERROR() instead of EMSG() where possible. +Files: src/memfile.c + + +*** ../vim-7.0.158/src/memfile.c Wed Nov 1 18:10:36 2006 +--- src/memfile.c Wed Nov 1 21:38:59 2006 +*************** +*** 1028,1039 **** + size = page_size * hp->bh_page_count; + if (lseek(mfp->mf_fd, offset, SEEK_SET) != offset) + { +! EMSG(_("E294: Seek error in swap file read")); + return FAIL; + } + if ((unsigned)vim_read(mfp->mf_fd, hp->bh_data, size) != size) + { +! EMSG(_("E295: Read error in swap file")); + return FAIL; + } + return OK; +--- 1028,1039 ---- + size = page_size * hp->bh_page_count; + if (lseek(mfp->mf_fd, offset, SEEK_SET) != offset) + { +! PERROR(_("E294: Seek error in swap file read")); + return FAIL; + } + if ((unsigned)vim_read(mfp->mf_fd, hp->bh_data, size) != size) + { +! PERROR(_("E295: Read error in swap file")); + return FAIL; + } + return OK; +*************** +*** 1085,1091 **** + offset = (off_t)page_size * nr; + if (lseek(mfp->mf_fd, offset, SEEK_SET) != offset) + { +! EMSG(_("E296: Seek error in swap file write")); + return FAIL; + } + if (hp2 == NULL) /* freed block, fill with dummy data */ +--- 1085,1091 ---- + offset = (off_t)page_size * nr; + if (lseek(mfp->mf_fd, offset, SEEK_SET) != offset) + { +! PERROR(_("E296: Seek error in swap file write")); + return FAIL; + } + if (hp2 == NULL) /* freed block, fill with dummy data */ +*** ../vim-7.0.158/src/version.c Wed Nov 1 21:24:58 2006 +--- src/version.c Tue Nov 7 17:58:58 2006 +*************** +*** 668,669 **** +--- 668,671 ---- + { /* Add new patch number below this line */ ++ /**/ ++ 159, + /**/ + +-- +hundred-and-one symptoms of being an internet addict: +171. You invent another person and chat with yourself in empty chat rooms. + + /// Bram Moolenaar -- Bram@Moolenaar.net -- http://www.Moolenaar.net \\\ +/// sponsor Vim, vote for features -- http://www.Vim.org/sponsor/ \\\ +\\\ download, build and distribute -- http://www.A-A-P.org /// + \\\ help me help AIDS victims -- http://ICCF-Holland.org /// --- vim-7.0.orig/upstream/patches/7.0.003 +++ vim-7.0/upstream/patches/7.0.003 @@ -0,0 +1,62 @@ +To: vim-dev@vim.org +Subject: Patch 7.0.003 +Fcc: outbox +From: Bram Moolenaar +Mime-Version: 1.0 +Content-Type: text/plain; charset=ISO-8859-1 +Content-Transfer-Encoding: 8bit +------------ + +Patch 7.0.003 +Problem: GUI: clicking in the lower part of a label in the tab pages line + while 'mousefocus' is set may warp the mouse pointer. (Robert + Webb) +Solution: Check for a negative mouse position. +Files: src/gui.c + + +*** ../vim-7.0.002/src/gui.c Wed May 10 15:22:49 2006 +--- src/gui.c Mon May 8 16:31:49 2006 +*************** +*** 4603,4613 **** + /* Don't move the mouse when it's left or right of the Vim window */ + if (x < 0 || x > Columns * gui.char_width) + return; + # ifdef FEAT_WINDOWS +! if (Y_2_ROW(y) >= tabline_height()) +! # else +! if (y >= 0) + # endif + wp = xy2win(x, y); + if (wp != curwin && wp != NULL) /* If in other than current window */ + { +--- 4603,4613 ---- + /* Don't move the mouse when it's left or right of the Vim window */ + if (x < 0 || x > Columns * gui.char_width) + return; ++ if (y >= 0 + # ifdef FEAT_WINDOWS +! && Y_2_ROW(y) >= tabline_height() + # endif ++ ) + wp = xy2win(x, y); + if (wp != curwin && wp != NULL) /* If in other than current window */ + { +*** ../vim-7.0.002/src/version.c Wed May 10 15:25:45 2006 +--- src/version.c Wed May 10 17:12:27 2006 +*************** +*** 668,669 **** +--- 668,671 ---- + { /* Add new patch number below this line */ ++ /**/ ++ 3, + /**/ + +-- +From "know your smileys": + 2B|^2B Message from Shakespeare + + /// Bram Moolenaar -- Bram@Moolenaar.net -- http://www.Moolenaar.net \\\ +/// sponsor Vim, vote for features -- http://www.Vim.org/sponsor/ \\\ +\\\ download, build and distribute -- http://www.A-A-P.org /// + \\\ help me help AIDS victims -- http://ICCF-Holland.org /// --- vim-7.0.orig/upstream/patches/7.0.071 +++ vim-7.0/upstream/patches/7.0.071 @@ -0,0 +1,52 @@ +To: vim-dev@vim.org +Subject: Patch 7.0.071 +Fcc: outbox +From: Bram Moolenaar +Mime-Version: 1.0 +Content-Type: text/plain; charset=ISO-8859-1 +Content-Transfer-Encoding: 8bit +------------ + +Patch 7.0.071 +Problem: Using an empty search pattern may cause a crash. +Solution: Avoid using a NULL pointer. +Files: src/search.c + + +*** ../vim-7.0.070/src/search.c Tue Aug 29 17:28:56 2006 +--- src/search.c Tue Aug 29 14:56:15 2006 +*************** +*** 1259,1265 **** + /* + * Add character and/or line offset + */ +! if (!(options & SEARCH_NOOF) || *pat == ';') + { + if (spats[0].off.line) /* Add the offset to the line number. */ + { +--- 1259,1265 ---- + /* + * Add character and/or line offset + */ +! if (!(options & SEARCH_NOOF) || (pat != NULL && *pat == ';')) + { + if (spats[0].off.line) /* Add the offset to the line number. */ + { +*** ../vim-7.0.070/src/version.c Tue Aug 29 17:28:56 2006 +--- src/version.c Tue Aug 29 17:59:24 2006 +*************** +*** 668,669 **** +--- 668,671 ---- + { /* Add new patch number below this line */ ++ /**/ ++ 71, + /**/ + +-- +hundred-and-one symptoms of being an internet addict: +268. You get up in the morning and go online before getting your coffee. + + /// Bram Moolenaar -- Bram@Moolenaar.net -- http://www.Moolenaar.net \\\ +/// sponsor Vim, vote for features -- http://www.Vim.org/sponsor/ \\\ +\\\ download, build and distribute -- http://www.A-A-P.org /// + \\\ help me help AIDS victims -- http://ICCF-Holland.org /// --- vim-7.0.orig/upstream/patches/7.0.128 +++ vim-7.0/upstream/patches/7.0.128 @@ -0,0 +1,76 @@ +To: vim-dev@vim.org +Subject: Patch 7.0.128 +Fcc: outbox +From: Bram Moolenaar +Mime-Version: 1.0 +Content-Type: text/plain; charset=ISO-8859-1 +Content-Transfer-Encoding: 8bit +------------ + +Patch 7.0.128 +Problem: GUI: when closing gvim is cancelled because there is a changed + buffer the screen isn't updated to show the changed buffer in the + current window. (Krzysztof Kacprzak) +Solution: Redraw when closing gvim is cancelled. +Files: src/gui.c + + +*** ../vim-7.0.127/src/gui.c Sun Oct 8 13:56:53 2006 +--- src/gui.c Tue Oct 10 13:45:13 2006 +*************** +*** 637,642 **** +--- 637,643 ---- + + #if defined(FEAT_GUI_GTK) || defined(FEAT_GUI_X11) || defined(FEAT_GUI_MSWIN) \ + || defined(FEAT_GUI_PHOTON) || defined(FEAT_GUI_MAC) || defined(PROTO) ++ # define NEED_GUI_UPDATE_SCREEN 1 + /* + * Called when the GUI shell is closed by the user. If there are no changed + * files Vim exits, otherwise there will be a dialog to ask the user what to +*************** +*** 665,672 **** + + exiting = FALSE; + cmdmod = save_cmdmod; +! setcursor(); /* position cursor */ +! out_flush(); + } + #endif + +--- 666,672 ---- + + exiting = FALSE; + cmdmod = save_cmdmod; +! gui_update_screen(); /* redraw, window may show changed buffer */ + } + #endif + +*************** +*** 4823,4828 **** +--- 4823,4829 ---- + #endif + + #if defined(FIND_REPLACE_DIALOG) || defined(FEAT_SUN_WORKSHOP) \ ++ || defined(NEED_GUI_UPDATE_SCREEN) \ + || defined(PROTO) + /* + * Update the current window and the screen. +*** ../vim-7.0.127/src/version.c Tue Oct 10 16:20:51 2006 +--- src/version.c Tue Oct 10 17:35:42 2006 +*************** +*** 668,669 **** +--- 668,671 ---- + { /* Add new patch number below this line */ ++ /**/ ++ 128, + /**/ + +-- +How To Keep A Healthy Level Of Insanity: +18. When leaving the zoo, start running towards the parking lot, + yelling "run for your lives, they're loose!!" + + /// Bram Moolenaar -- Bram@Moolenaar.net -- http://www.Moolenaar.net \\\ +/// sponsor Vim, vote for features -- http://www.Vim.org/sponsor/ \\\ +\\\ download, build and distribute -- http://www.A-A-P.org /// + \\\ help me help AIDS victims -- http://ICCF-Holland.org /// --- vim-7.0.orig/upstream/patches/7.0.102 +++ vim-7.0/upstream/patches/7.0.102 @@ -0,0 +1,54 @@ +To: vim-dev@vim.org +Subject: Patch 7.0.102 +Fcc: outbox +From: Bram Moolenaar +Mime-Version: 1.0 +Content-Type: text/plain; charset=ISO-8859-1 +Content-Transfer-Encoding: 8bit +------------ + +Patch 7.0.102 +Problem: Redrawing cmdline is not correct when using SCIM. +Solution: Don't call im_get_status(). (Yukihiro Nakadaira) +Files: src/ex_getln.c + + +*** ../vim-7.0.101/src/ex_getln.c Sun Sep 10 21:05:39 2006 +--- src/ex_getln.c Tue Sep 12 20:52:51 2006 +*************** +*** 2363,2369 **** + { + if ((State & CMDLINE) + && xic != NULL +! && im_get_status() + && !p_imdisable + && im_is_preediting()) + { +--- 2363,2369 ---- + { + if ((State & CMDLINE) + && xic != NULL +! /* && im_get_status() doesn't work when using SCIM */ + && !p_imdisable + && im_is_preediting()) + { +*** ../vim-7.0.101/src/version.c Tue Sep 12 22:24:48 2006 +--- src/version.c Thu Sep 14 10:23:45 2006 +*************** +*** 668,669 **** +--- 668,671 ---- + { /* Add new patch number below this line */ ++ /**/ ++ 102, + /**/ + +-- +TIM: That is not an ordinary rabbit ... 'tis the most foul cruel and + bad-tempered thing you ever set eyes on. +ROBIN: You tit. I soiled my armour I was so scared! + "Monty Python and the Holy Grail" PYTHON (MONTY) PICTURES LTD + + /// Bram Moolenaar -- Bram@Moolenaar.net -- http://www.Moolenaar.net \\\ +/// sponsor Vim, vote for features -- http://www.Vim.org/sponsor/ \\\ +\\\ download, build and distribute -- http://www.A-A-P.org /// + \\\ help me help AIDS victims -- http://ICCF-Holland.org /// --- vim-7.0.orig/upstream/patches/7.0.080 +++ vim-7.0/upstream/patches/7.0.080 @@ -0,0 +1,57 @@ +To: vim-dev@vim.org +Subject: Patch 7.0.080 +Fcc: outbox +From: Bram Moolenaar +Mime-Version: 1.0 +Content-Type: text/plain; charset=ISO-8859-1 +Content-Transfer-Encoding: 8bit +------------ + +Patch 7.0.080 +Problem: Generating auto/pathdef.c fails for CFLAGS with a backslash. +Solution: Double backslashes in the string. (Alexey Froloff) +Files: src/Makefile + + +*** ../vim-7.0.079/src/Makefile Sat Sep 2 15:31:29 2006 +--- src/Makefile Fri Sep 1 21:00:29 2006 +*************** +*** 2261,2267 **** + auto/osdef.h: auto/config.h osdef.sh osdef1.h.in osdef2.h.in + CC="$(CC) $(OSDEF_CFLAGS)" srcdir=$(srcdir) sh $(srcdir)/osdef.sh + +! QUOTESED = sed -e 's/"/\\"/g' -e 's/\\"/"/' -e 's/\\";$$/";/' + auto/pathdef.c: Makefile auto/config.mk + -@echo creating $@ + -@echo '/* pathdef.c */' > $@ +--- 2262,2268 ---- + auto/osdef.h: auto/config.h osdef.sh osdef1.h.in osdef2.h.in + CC="$(CC) $(OSDEF_CFLAGS)" srcdir=$(srcdir) sh $(srcdir)/osdef.sh + +! QUOTESED = sed -e 's/[\\"]/\\&/g' -e 's/\\"/"/' -e 's/\\";$$/";/' + auto/pathdef.c: Makefile auto/config.mk + -@echo creating $@ + -@echo '/* pathdef.c */' > $@ +*** ../vim-7.0.079/src/version.c Sat Sep 2 14:54:17 2006 +--- src/version.c Sat Sep 2 16:35:50 2006 +*************** +*** 668,669 **** +--- 668,671 ---- + { /* Add new patch number below this line */ ++ /**/ ++ 80, + /**/ + +-- +E M A C S +s e l o h +c t t n i +a a t f +p r t +e o + l + + /// Bram Moolenaar -- Bram@Moolenaar.net -- http://www.Moolenaar.net \\\ +/// sponsor Vim, vote for features -- http://www.Vim.org/sponsor/ \\\ +\\\ download, build and distribute -- http://www.A-A-P.org /// + \\\ help me help AIDS victims -- http://ICCF-Holland.org /// --- vim-7.0.orig/upstream/patches/7.0.087 +++ vim-7.0/upstream/patches/7.0.087 @@ -0,0 +1,262 @@ +To: vim-dev@vim.org +Subject: Patch 7.0.087 +Fcc: outbox +From: Bram Moolenaar +Mime-Version: 1.0 +Content-Type: text/plain; charset=ISO-8859-1 +Content-Transfer-Encoding: 8bit +------------ + +Patch 7.0.087 +Problem: After ":file fname" and ":saveas fname" the 'autochdir' option + does not take effect. (Yakov Lerner) + Commands for handling 'autochdir' are repeated many times. +Solution: Add the DO_AUTOCHDIR macro and do_autochdir(). Use it for + ":file fname" and ":saveas fname". +Files: src/proto/buffer.pro, src/buffer.c, src/ex_cmds.c, src/macros.h, + src/option.c, src/window.c + + +*** ../vim-7.0.086/src/proto/buffer.pro Sun Apr 30 20:25:32 2006 +--- src/proto/buffer.pro Tue Sep 5 16:25:40 2006 +*************** +*** 10,15 **** +--- 10,16 ---- + extern int do_buffer __ARGS((int action, int start, int dir, int count, int forceit)); + extern void set_curbuf __ARGS((buf_T *buf, int action)); + extern void enter_buffer __ARGS((buf_T *buf)); ++ extern void do_autochdir __ARGS((void)); + extern buf_T *buflist_new __ARGS((char_u *ffname, char_u *sfname, linenr_T lnum, int flags)); + extern void free_buf_options __ARGS((buf_T *buf, int free_p_ff)); + extern int buflist_getfile __ARGS((int n, linenr_T lnum, int options, int forceit)); +*** ../vim-7.0.086/src/buffer.c Tue Aug 29 16:52:01 2006 +--- src/buffer.c Tue Sep 5 15:18:19 2006 +*************** +*** 434,445 **** + if (usingNetbeans) + netbeans_file_closed(buf); + #endif +! #ifdef FEAT_AUTOCHDIR +! /* Change directories when the acd option is set on. */ +! if (p_acd && curbuf->b_ffname != NULL +! && vim_chdirfile(curbuf->b_ffname) == OK) +! shorten_fnames(TRUE); +! #endif + + /* + * Remove the buffer from the list. +--- 434,441 ---- + if (usingNetbeans) + netbeans_file_closed(buf); + #endif +! /* Change directories when the 'acd' option is set. */ +! DO_AUTOCHDIR + + /* + * Remove the buffer from the list. +*************** +*** 1422,1433 **** + netbeans_file_activated(curbuf); + #endif + +! #ifdef FEAT_AUTOCHDIR +! /* Change directories when the acd option is set on. */ +! if (p_acd && curbuf->b_ffname != NULL +! && vim_chdirfile(curbuf->b_ffname) == OK) +! shorten_fnames(TRUE); +! #endif + + #ifdef FEAT_KEYMAP + if (curbuf->b_kmap_state & KEYMAP_INIT) +--- 1418,1425 ---- + netbeans_file_activated(curbuf); + #endif + +! /* Change directories when the 'acd' option is set. */ +! DO_AUTOCHDIR + + #ifdef FEAT_KEYMAP + if (curbuf->b_kmap_state & KEYMAP_INIT) +*************** +*** 1435,1440 **** +--- 1427,1444 ---- + #endif + redraw_later(NOT_VALID); + } ++ ++ #if defined(FEAT_AUTOCHDIR) || defined(PROTO) ++ /* ++ * Change to the directory of the current buffer. ++ */ ++ void ++ do_autochdir() ++ { ++ if (curbuf->b_ffname != NULL && vim_chdirfile(curbuf->b_ffname) == OK) ++ shorten_fnames(TRUE); ++ } ++ #endif + + /* + * functions for dealing with the buffer list +*** ../vim-7.0.086/src/ex_cmds.c Tue Aug 29 17:28:56 2006 +--- src/ex_cmds.c Tue Sep 5 15:24:58 2006 +*************** +*** 2458,2463 **** +--- 2458,2465 ---- + #ifdef FEAT_AUTOCMD + apply_autocmds(EVENT_BUFFILEPOST, NULL, NULL, FALSE, curbuf); + #endif ++ /* Change directories when the 'acd' option is set. */ ++ DO_AUTOCHDIR + } + /* print full file name if :cd used */ + fileinfo(FALSE, FALSE, eap->forceit); +*************** +*** 2675,2682 **** + eap, eap->append, eap->forceit, TRUE, FALSE); + + /* After ":saveas fname" reset 'readonly'. */ +! if (eap->cmdidx == CMD_saveas && retval == OK) +! curbuf->b_p_ro = FALSE; + } + + theend: +--- 2677,2689 ---- + eap, eap->append, eap->forceit, TRUE, FALSE); + + /* After ":saveas fname" reset 'readonly'. */ +! if (eap->cmdidx == CMD_saveas) +! { +! if (retval == OK) +! curbuf->b_p_ro = FALSE; +! /* Change directories when the 'acd' option is set. */ +! DO_AUTOCHDIR +! } + } + + theend: +*************** +*** 3547,3557 **** + foldUpdateAll(curwin); + #endif + +! #ifdef FEAT_AUTOCHDIR +! if (p_acd && curbuf->b_ffname != NULL +! && vim_chdirfile(curbuf->b_ffname) == OK) +! shorten_fnames(TRUE); +! #endif + /* + * Careful: open_buffer() and apply_autocmds() may change the current + * buffer and window. +--- 3554,3562 ---- + foldUpdateAll(curwin); + #endif + +! /* Change directories when the 'acd' option is set. */ +! DO_AUTOCHDIR +! + /* + * Careful: open_buffer() and apply_autocmds() may change the current + * buffer and window. +*************** +*** 3718,3729 **** + if (p_im) + need_start_insertmode = TRUE; + +! #ifdef FEAT_AUTOCHDIR +! /* Change directories when the acd option is set on. */ +! if (p_acd && curbuf->b_ffname != NULL +! && vim_chdirfile(curbuf->b_ffname) == OK) +! shorten_fnames(TRUE); +! #endif + + #if defined(FEAT_SUN_WORKSHOP) || defined(FEAT_NETBEANS_INTG) + if (gui.in_use && curbuf->b_ffname != NULL) +--- 3723,3730 ---- + if (p_im) + need_start_insertmode = TRUE; + +! /* Change directories when the 'acd' option is set. */ +! DO_AUTOCHDIR + + #if defined(FEAT_SUN_WORKSHOP) || defined(FEAT_NETBEANS_INTG) + if (gui.in_use && curbuf->b_ffname != NULL) +*** ../vim-7.0.086/src/macros.h Wed Mar 1 23:00:25 2006 +--- src/macros.h Tue Sep 5 15:15:30 2006 +*************** +*** 276,278 **** +--- 276,284 ---- + # define MB_CHARLEN(p) STRLEN(p) + # define PTR2CHAR(p) ((int)*(p)) + #endif ++ ++ #ifdef FEAT_AUTOCHDIR ++ # define DO_AUTOCHDIR if (p_acd) do_autochdir(); ++ #else ++ # define DO_AUTOCHDIR ++ #endif +*** ../vim-7.0.086/src/option.c Tue Aug 29 17:28:56 2006 +--- src/option.c Tue Sep 5 15:20:04 2006 +*************** +*** 7326,7334 **** + #ifdef FEAT_AUTOCHDIR + else if ((int *)varp == &p_acd) + { +! if (p_acd && curbuf->b_ffname != NULL +! && vim_chdirfile(curbuf->b_ffname) == OK) +! shorten_fnames(TRUE); + } + #endif + +--- 7326,7333 ---- + #ifdef FEAT_AUTOCHDIR + else if ((int *)varp == &p_acd) + { +! /* Change directories when the 'acd' option is set now. */ +! DO_AUTOCHDIR + } + #endif + +*** ../vim-7.0.086/src/window.c Tue Aug 29 17:28:56 2006 +--- src/window.c Tue Sep 5 15:20:35 2006 +*************** +*** 3954,3966 **** + setmouse(); /* in case jumped to/from help buffer */ + #endif + +! #ifdef FEAT_AUTOCHDIR +! /* Change directories when the 'acd' option is set on and after +! * switching windows. */ +! if (p_acd && curbuf->b_ffname != NULL +! && vim_chdirfile(curbuf->b_ffname) == OK) +! shorten_fnames(TRUE); +! #endif + } + + #endif /* FEAT_WINDOWS */ +--- 3954,3961 ---- + setmouse(); /* in case jumped to/from help buffer */ + #endif + +! /* Change directories when the 'acd' option is set. */ +! DO_AUTOCHDIR + } + + #endif /* FEAT_WINDOWS */ +*** ../vim-7.0.086/src/version.c Tue Sep 5 15:36:30 2006 +--- src/version.c Tue Sep 5 15:52:45 2006 +*************** +*** 668,669 **** +--- 668,671 ---- + { /* Add new patch number below this line */ ++ /**/ ++ 87, + /**/ + +-- +Overflow on /dev/null, please empty the bit bucket. + + /// Bram Moolenaar -- Bram@Moolenaar.net -- http://www.Moolenaar.net \\\ +/// sponsor Vim, vote for features -- http://www.Vim.org/sponsor/ \\\ +\\\ download, build and distribute -- http://www.A-A-P.org /// + \\\ help me help AIDS victims -- http://ICCF-Holland.org /// --- vim-7.0.orig/upstream/patches/7.0.049 +++ vim-7.0/upstream/patches/7.0.049 @@ -0,0 +1,68 @@ +To: vim-dev@vim.org +Subject: Patch 7.0.049 +Fcc: outbox +From: Bram Moolenaar +Mime-Version: 1.0 +Content-Type: text/plain; charset=ISO-8859-1 +Content-Transfer-Encoding: 8bit +------------ + +Patch 7.0.049 +Problem: Some TCL scripts are not recognized. (Steven Atkinson) +Solution: Check for "exec wish" in the file. +Files: runtime/scripts.vim + + +*** ../vim-7.0.048/runtime/scripts.vim Tue Mar 28 23:07:11 2006 +--- runtime/scripts.vim Sat Jul 8 22:20:51 2006 +*************** +*** 1,7 **** + " Vim support file to detect file types in scripts + " + " Maintainer: Bram Moolenaar +! " Last change: 2006 Mar 28 + + " This file is called by an autocommand for every file that has just been + " loaded into a buffer. It checks if the type of file can be recognized by +--- 1,7 ---- + " Vim support file to detect file types in scripts + " + " Maintainer: Bram Moolenaar +! " Last change: 2006 Jul 08 + + " This file is called by an autocommand for every file that has just been + " loaded into a buffer. It checks if the type of file can be recognized by +*************** +*** 52,57 **** +--- 52,63 ---- + let s:name = substitute(s:line1, '^#!\s*\([^/\\ ]*\>\).*', '\1', '') + else + let s:name = substitute(s:line1, '^#!\s*\S*[/\\]\(\i\+\).*', '\1', '') ++ endif ++ ++ " tcl scripts may have #!/bin/sh in the first line and "exec wish" in the ++ " third line. Suggested by Steven Atkinson. ++ if getline(3) =~ '^exec wish' ++ let s:name = 'wish' + endif + + " Bourne-like shell scripts: bash bash2 ksh ksh93 sh +*** ../vim-7.0.048/src/version.c Tue Aug 8 19:55:06 2006 +--- src/version.c Tue Aug 8 20:53:58 2006 +*************** +*** 668,669 **** +--- 668,671 ---- + { /* Add new patch number below this line */ ++ /**/ ++ 49, + /**/ + +-- +I AM THANKFUL... +...for the piles of laundry and ironing because it means I +have plenty of clothes to wear. + + /// Bram Moolenaar -- Bram@Moolenaar.net -- http://www.Moolenaar.net \\\ +/// sponsor Vim, vote for features -- http://www.Vim.org/sponsor/ \\\ +\\\ download, build and distribute -- http://www.A-A-P.org /// + \\\ help me help AIDS victims -- http://ICCF-Holland.org /// --- vim-7.0.orig/upstream/patches/7.0.079 +++ vim-7.0/upstream/patches/7.0.079 @@ -0,0 +1,957 @@ +To: vim-dev@vim.org +Subject: Patch 7.0.079 +Fcc: outbox +From: Bram Moolenaar +Mime-Version: 1.0 +Content-Type: text/plain; charset=ISO-8859-1 +Content-Transfer-Encoding: 8bit +------------ + +Patch 7.0.079 +Problem: Russian tutor doesn't work when 'encoding' is "utf-8". +Solution: Use tutor.ru.utf-8 as the master, and generate the other encodings + from it. Select the right tutor depending on 'encoding'. (Alexey + Froloff) +Files: runtime/tutor/Makefile, runtime/tutor/tutor.vim, + runtime/tutor/tutor.ru.utf-8 + + +*** ../vim-7.0.079/runtime/tutor/Makefile Sun Jun 13 20:35:48 2004 +--- runtime/tutor/Makefile Fri Sep 1 20:38:20 2006 +*************** +*** 2,9 **** + # + # The Japanese tutor exists in three encodings. Use the UTF-8 version as the + # original and create the others with conversion. + +! all: tutor.ja.sjis tutor.ja.euc tutor.ko.euc + + tutor.ja.sjis: tutor.ja.utf-8 + nkf -WXs tutor.ja.utf-8 > tutor.ja.sjis +--- 2,13 ---- + # + # The Japanese tutor exists in three encodings. Use the UTF-8 version as the + # original and create the others with conversion. ++ # ++ # Similarly for Russian and Korean + +! all: tutor.ja.sjis tutor.ja.euc \ +! tutor.ko.euc \ +! tutor.ru tutor.ru.cp1251 + + tutor.ja.sjis: tutor.ja.utf-8 + nkf -WXs tutor.ja.utf-8 > tutor.ja.sjis +*************** +*** 13,15 **** +--- 17,25 ---- + + tutor.ko.euc: tutor.ko.utf-8 + iconv -f UTF-8 -t EUC-KR tutor.ko.utf-8 > tutor.ko.euc ++ ++ tutor.ru: tutor.ru.utf-8 ++ iconv -f UTF-8 -t KOI8-R tutor.ru.utf-8 > tutor.ru ++ ++ tutor.ru.cp1251: tutor.ru.utf-8 ++ iconv -f UTF-8 -t cp1251 tutor.ru.utf-8 > tutor.ru.cp1251 +*** ../vim-7.0.079/runtime/tutor/tutor.vim Sat Mar 18 22:36:12 2006 +--- runtime/tutor/tutor.vim Sat Sep 2 12:06:47 2006 +*************** +*** 1,6 **** + " Vim tutor support file + " Author: Eduardo F. Amatria +! " Last Change: 2006 Mar 18 + + " This small source file is used for detecting if a translation of the + " tutor file exist, i.e., a tutor.xx file, where xx is the language. +--- 1,6 ---- + " Vim tutor support file + " Author: Eduardo F. Amatria +! " Last Change: 2006 Sep 02 + + " This small source file is used for detecting if a translation of the + " tutor file exist, i.e., a tutor.xx file, where xx is the language. +*************** +*** 103,113 **** + let s:ext = ".sk.cp1250" + endif + +! " The Russian tutor is available in two encodings, guess which one to use. +! " This segment is from the above lines and modified by +! " Alexey I. Froloff for Russian vim tutorial +! if s:ext =~? '\.ru' && &enc =~ 1251 +! let s:ext = ".ru.cp1251" + endif + + " Somehow ".ge" (Germany) is sometimes used for ".de" (Deutsch). +--- 103,117 ---- + let s:ext = ".sk.cp1250" + endif + +! " The Russian tutor is available in three encodings, guess which one to use. +! if s:ext =~? '\.ru' +! if &enc == 'utf-8' +! let s:ext = '.ru.utf-8' +! elseif &enc =~ '1251' +! let s:ext = '.ru.cp1251' +! elseif &enc =~ 'koi8' +! let s:ext = '.ru' +! endif + endif + + " Somehow ".ge" (Germany) is sometimes used for ".de" (Deutsch). +*** ../vim-7.0.079/runtime/tutor/tutor.ru.utf-8 Sat Sep 2 14:53:18 2006 +--- runtime/tutor/tutor.ru.utf-8 Fri Sep 1 20:33:59 2006 +*************** +*** 0 **** +--- 1,834 ---- ++ =============================================================================== ++ = Д о б р о п о ж а л о в а т ь в у ч е б н и к VIM - Версия 1.5 = ++ =============================================================================== ++ Vim --- это очень мощный редактор, имеющий множество команд, слишком ++ много для того, чтобы их все можно было описать в таком учебнике, как ++ этот. Этот учебник призван объяснить достаточное число команд для того, ++ чтобы Вы могли с легкостью использовать Vim в качестве редактора общего ++ назначения. ++ ++ Вам потребуется приблизительно 25-30 минут на освоение данного учебника в ++ зависимости от того, сколько времени Вы потратите на эксперименты. ++ ++ Команды в уроках будут модифицировать текст. Создайте копию этого файла, ++ чтобы попрактиковаться на ней (если Вы запустили "vimtutor", то это уже ++ копия). ++ ++ Важно помнить, что этот учебник предназначен для обучения в процессе ++ использования. Это означает, что Вы должны запускать команды для того, ++ чтобы как следует их изучить. Если Вы просто прочитаете текст, то ++ забудете команды! ++ ++ Теперь убедитесь в том, что клавиша CapsLock не включена и нажмите ++ клавишу j несколько раз, так, чтобы Урок 1.1 полностью поместился на ++ экране. ++ ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ ++ Урок 1.1: ПЕРЕМЕЩЕНИЕ КУРСОРА ++ ++ ** Для перемещения курсора нажмите клавиши h,j,k,l так, как показано ниже. ** ++ ^ ++ k Советы: Клавиша h находится слева и перемещает влево. ++ < h l > Клавиша l находится справа и перемещает вправо. ++ j Клавиша j похожа на стрелку `вниз'. ++ v ++ 1. Подвигайте курсор по экрану, пока не почувствуете себя уверенно. ++ ++ 2. Надавите клавишу `вниз' (j) пока она не начнет повторяться. ++ ---> Теперь Вы знаете, как перейти к следующему уроку. ++ ++ 3. Используя клавишу `вниз' перейдите к Уроку 1.2. ++ ++ Замечание: Если вы пока не уверены в том, что набираете, нажмите для ++ перехода в обычный режим (Normal mode). После этого перенаберите ++ требуемую команду. ++ ++ Замечание: Обычные клавиши управления курсором (стрелки) также должны ++ работать. Однако, клавиши hjkl позволят Вам перемещаться ++ значительно быстрее, как только Вы научитесь ими пользоваться. ++ ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ ++ Урок 1.2: ЗАПУСК И ЗАВЕРШЕНИЕ РАБОТЫ С VIM ++ ++ !! ВНИМАНИЕ! Прежде, чем выполнять любой из описанных ниже шагов, прочтите ++ урок целиком !! ++ ++ 1. Нажмите клавишу (для того, чтобы удостовериться, что Вы в обычном ++ режиме (Normal mode)). ++ ++ 2. Наберите: :q! . ++ ++ ---> Это позволит Вам выйти из редактора БЕЗ СОХРАНЕНИЯ любых сделанных ++ изменений. Если Вы хотите сохранить изменения и выйти: ++ :wq ++ ++ 3. Когда Вы увидите приглашение командной оболочки, наберите команду, ++ которая привела Вас в этот учебник. Это может быть ++ vimtutor ru ++ Обычно можно использовать: vim tutor.ru ++ ++ ---> 'vim' позволяет запустить редактор vim, 'tutor.ru' --- это файл, который ++ Вы будете редактировать. ++ ++ 4. Если Вы уверены в том, что запомнили эти шаги, выполните шаги от 1 до 3 ++ чтобы выйти снова запустить редактор. Затем переместите курсор вниз к ++ Уроку 1.3. ++ ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ ++ Урок 1.3: РЕДАКТИРОВАНИЕ ТЕКСТА - УДАЛЕНИЕ ++ ++ ++ ** Находясь в обычном режиме нажмите x, чтобы удалить символ под курсором. ** ++ ++ 1. Переместите курсор к строке внизу, помеченной --->. ++ ++ 2. Для исправления ошибок, переместите курсор, пока он не окажется над ++ удаляемым символом. ++ ++ 3. Нажмите клавишу x для удаления требуемого символа. ++ ++ 4. Повторите шаги 2--4 пока строка не будет исправлена. ++ ++ ---> От тттопота копытт пппыль ппо ппполю леттитт. ++ ++ 5. Теперь, когда строка откорректирована, переходите к уроку 1.4. ++ ++ ЗАМЕЧАНИЕ: В ходе освоения этого учебника не пытайтесь запоминать, учите ++ в процессе использования. ++ ++ ++ ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ ++ Урок 1.4: РЕДАКТИРОВАНИЕ ТЕКСТА - ВСТАВКА ++ ++ ++ ** Находясь в обычном режиме (Normal mode), нажмите i для вставки текста. ** ++ ++ 1. Переместите курсор к первой строке внизу, помеченной --->. ++ ++ 2. Для того, чтобы сделать первую строку идентичной второй, поместите ++ курсор на символ ПЕРЕД которым следует вставить текст. ++ ++ 3. Нажмите i и наберите требуемые добавления. ++ ++ 4. После исправления всех ошибок нажмите для возврата в обычный режим. ++ Повторите шаги 2--4, пока фраза не будет исправлена полностью. ++ ++ ---> Часть текста в строке беследно . ++ ---> Часть текста в этой строке бесследно пропала. ++ ++ 5. Когда освоите вставку текста, переходите дальше к Резюме. ++ ++ ++ ++ ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ ++ РЕЗЮМЕ УРОКА 1 ++ ++ 1. Курсор перемещается либо клавишами со стрелками, либо клавишами hjkl. ++ h (влево) j (вниз) k (вверх) l (вправо) ++ ++ 2. Для запуска Vim (из приглашения % командной оболочки) наберите: ++ vim ИМЯ_ФАЙЛА ++ ++ 3. Для завершения работы с Vim наберите: ++ :q! чтобы отказаться от сохранения изменений. ++ Или наберите: ++ :wq чтобы сохранить изменения. ++ ++ 4. Для удаления символа под курсором в обычном режиме, наберите: x ++ ++ 5. Чтобы вставить текст перед курсором в обычном режиме, наберите: ++ i вводите текст ++ ++ ЗАМЕЧАНИЕ: Нажатие переместит Вас в обычный режим (Normal mode) либо ++ прервет нежелательную и частично завершенную команду. ++ ++ Теперь переходим к Уроку 2. ++ ++ ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ ++ Урок 2.1: КОМАНДЫ УДАЛЕНИЯ ++ ++ ++ ** Наберите dw для удаления участка текста до конца слова. ** ++ ++ 1. Нажмите , чтобы перейти в обычный режим. ++ ++ 2. Переместите курсор вниз, к строке, помеченной --->. ++ ++ 3. Переместите курсор в начало слова, которое следует удалить. ++ ++ 4. Наберите dw , чтобы удалить это слово. ++ ++ ЗАМЕЧАНИЕ: Во время набора буквы dw появятся в последней строке экрана. Если ++ Вы что-то наберете неправильно, нажмите и начните сначала. ++ ++ ---> Несколько слов рафинад в этом предложении автокран излишни. ++ ++ 5. Повторите шаги 3 и 4, пока не исправите все ошибки и переходите к ++ Уроку 2.2. ++ ++ ++ ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ ++ Урок 2.2: ДОПОЛНИТЕЛЬНЫЕ КОМАНДЫ УДАЛЕНИЯ ++ ++ ++ ** Наберите d$ для удаления текста до конца строки. ** ++ ++ 1. Нажмите , чтобы перейти в обычный режим. ++ ++ 2. Переместите курсор вниз, к строке, помеченной --->. ++ ++ 3. Переместите курсор к концу правильной строки (ПОСЛЕ первой . ). ++ ++ 4. Чтобы удалить остаток строки, наберите d$ . ++ ++ ---> Кто-то набрал окончание этой строки дважды. окончание этой строки дважды. ++ ++ ++ 5.Чтобы лучше разобраться в этом, переходите к Уроку 2.3. ++ ++ ++ ++ ++ ++ ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ ++ Урок 2.3: КОМАНДЫ И ОБЪЕКТЫ ++ ++ ++ Формат команды `удаление' d таков: ++ ++ [число] d объект ИЛИ d [число] объект ++ Здесь: ++ число - сколько раз исполнить команду (необязательно, по умолчанию=1). ++ d - команда удаления. ++ объект - с чем команда должна быть выполнена (перечислено ниже). ++ ++ Краткий список объектов: ++ w - от курсора до конца слова, включая завершающий пробел. ++ e - от курсора до конца слова, НЕ включая завершающий пробел. ++ $ - от курсора до конца строки. ++ ^ - от курсора до начала строки. ++ ++ ЗАМЕЧАНИЕ: Простое нажатие на символ объекта в обычном режиме (Normal mode) ++ без дополнительных команд передвинет курсор так, как указано в ++ списке объектов. ++ ++ ++ ++ ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ ++ Урок 2.4: ИСКЛЮЧЕНИЕ ИЗ ПРАВИЛА `КОМАНДА-ОБЪЕКТ' ++ ++ ++ ** Наберите dd для удаления всей строки. ** ++ ++ Вследствие частого применения операции удаления всей строки, разработчики ++ Vim решили, что для этого проще всего просто набрать d дважды. ++ ++ 1. Переместите курсор вниз, ко второй строке фразы. ++ 2. Наберите dd для удаления строки. ++ 3. Теперь переместитесь к четвертой строке. ++ 4. Наберите 2dd (вспомните правило `число-команда-объект'), чтобы удалить ++ две строки. ++ ++ 1) Летом я хожу на стадион, ++ 2) О, как внезапно кончился диван! ++ 3) Я болею за ``Зенит'', ``Зенит'' --- чемпион! ++ 4) Печально я гляжу на наше поколение! ++ 5) Его грядущее иль пусто иль темно... ++ 6) Я сижу на скамейке в ложе `Б' ++ 7) И играю на большой жестяной трубе. ++ ++ ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ ++ Урок 2.5: КОМАНДА `ОТКАТ' ++ ++ ++ ** Нажмите u для отмены результата работы предыдущей команды, U для отмены ++ исправлений во всей строке. ** ++ ++ 1. Переместите курсор вниз, к строке, помеченной ---> и установите его на ++ первую ошибку. ++ 2. Нажмите x для удаления первого неправильного символа. ++ 3. Теперь нажмите u для отмены (отката) последней выполненной команды. ++ 4. Исправьте все ошибки в строке, используя команду x . ++ 5. Теперь нажмите заглавную U для того, чтобы вернуть всю строку в исходное ++ состояние. ++ 6. Нажмите u несколько раз для отмены команды U и предыдущих команд. ++ 7. Нажмите теперь CTRL-R (удерживайте клавишу CTRL нажатой в момент нажатия ++ R) несколько раз для возврата команд (откат отката). ++ ++ ---> Испрравьте оошибки в этойй строке и вернитте их сс помощьью `отката'. ++ ++ 8. Это были очень полезные команды. Далее переходите к Резюме Урока 2. ++ ++ ++ ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ ++ РЕЗЮМЕ УРОКА 2 ++ ++ ++ 1. Для удаления текста от курсора до конца слова наберите: dw ++ ++ 2. Для удаления текста от курсора до конца строки наберите: d$ ++ ++ 3. Для удаления всей строки наберите: dd ++ ++ 4. Формат команды в обычном режиме имеет вид: ++ ++ [число] команда объект ИЛИ команда [число] объект ++ где: ++ число - сколько раз повторить выполнение команды ++ команда - что выполнить, например d для удаления ++ объект - на что должна воздействовать команда, например w (слово), ++ $ (до конца строки), и т.д. ++ ++ 5. Для отмены (отката) предшествующих действий наберите: u (строчная u) ++ Для отмены (отката) всех изменений в строке наберите: U (прописная U) ++ Для отмены отката наберите: CTRL-R ++ ++ ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ ++ Урок 3.1: КОМАНДА ВСТАВКИ ++ ++ ++ ** Наберите p для вставки последнего удаленного текста после курсора. ** ++ ++ 1. Переместите курсор вниз к последней строке из набора. ++ ++ 2. Наберите dd для удаления строки и ее сохранения в буфере Vim'а. ++ ++ 3. Переместите курсор к строке НАД тем местом, куда следует вставить ++ удаленную строку. ++ ++ 4. Находясь в обычном режиме наберите p для замены строки. ++ ++ 5. Повторите шаги 2--4, пока не расставите все строки в нужном порядке. ++ ++ г) И лучше выдумать не мог. ++ б) Когда не в шутку занемог, ++ в) Он уважать себя заставил ++ а) Мой дядя самых честных правил ++ ++ ++ ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ ++ Урок 3.2: КОМАНДА ЗАМЕНЫ ++ ++ ++ ** Наберите r и символ, заменяющий символ под курсором. ** ++ ++ 1. Переместите курсор вниз, к строке, помеченной --->. ++ ++ 2. Установите курсор так, чтобы он находился над первой ошибкой. ++ ++ 3. Наберите r и затем символ, исправляющий ошибку. ++ ++ 4. Повторите шаги 2 и 3, пока первая строка не будет исправлена. ++ ++ ---> В момегт набтра этой чтроки кое0кто с трудом попвдал по клваишам! ++ ---> В момент набора этой строки кое-кто с трудом попадал по клавишам! ++ ++ 5. Теперь переходите к Уроку 3.2. ++ ++ ЗАМЕЧАНИЕ: Помните, что вы должны учиться в процессе работы, а не просто ++ запоминая. ++ ++ ++ ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ ++ Урок 3.3: КОМАНДА ИЗМЕНЕНИЯ ++ ++ ++ ** Для изменения части слова наберите cw . ** ++ ++ 1. Переместите курсор вниз, к строке, помеченной --->. ++ ++ 2. Расположите курсор над буквой `o' в слове `сола'. ++ ++ 3. Наберите cw и исправьте слово (в данном случае, наберите `лов'.) ++ ++ 4. Нажмите и переходите к следующей ошибке (к первому символу, который ++ надо изменить.) ++ ++ 5. Повторите шаги 3--4 пока первое предложение не станет идентичным второму. ++ ++ ---> Несколько сола в эьгц строке тпгшцбь редалзкуюиесвх. ++ ---> Несколько слов в этой строке требуют редактирования. ++ ++ Обратите внимание, что cw не только заменяет слово, но и переводит вас в режим ++ вставки. ++ ++ ++ ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ ++ Урок 3.4: ПРОДОЛЖАЕМ ИЗМЕНЯТЬ С КОМАНДОЙ c ++ ++ ++ ** Команда замены используется с теми же объектами, что и команда удаления. ** ++ ++ 1. Команда изменения применяется таким же образом, как и команда удаления. ++ Ее формат таков: ++ ++ [число] c объект ИЛИ c [число] объект ++ ++ 2. Объекты также совпадают: w (слово), $ (конец строки) и т.п. ++ ++ 3. Переместите курсор вниз, к строке, помеченной --->. ++ ++ 4. Перейдите к первой ошибке. ++ ++ 5. Наберите c$ и отредактируйте первую строку так, чтобы она совпадала со ++ второй, после чего нажмите . ++ ++ ---> Конец этой строки нуждается в помощи, чтобы стать похожим на второй. ++ ---> Конец этой строки нуждается в помощи команды c$ . ++ ++ ++ ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ ++ РЕЗЮМЕ УРОКА 3 ++ ++ ++ 1. Для вставки текста, который только что был удален, наберите p . Эта ++ команда вставит удаленный текст ПОСЛЕ курсора (если была удалена строка, ++ то она будет помещена в строке под курсором). ++ ++ 2. Для замены символа под курсором наберите r и затем заменяющий символ. ++ ++ 3. Команда изменения позволяет Вам изменить указанный объект от курсора до ++ конца этого объекта. Например, наберите cw для замены от курсора до ++ конца слова, c$ для изменения до конца строки. ++ ++ 4. Формат команды изменения таков: ++ ++ [число] c объект ИЛИ c [число] объект ++ ++ Теперь отправляйтесь к следующему уроку. ++ ++ ++ ++ ++ ++ ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ ++ Урок 4.1: ИНФОРМАЦИЯ О ФАЙЛЕ И РАСПОЛОЖЕНИЕ В НЕМ ++ ++ ++ ** Наберите CTRL-g чтобы увидеть Ваше месторасположение в файле и информацию ++ о нем. ++ Наберите SHIFT-G для перемещения к заданной строке в файле. ** ++ ++ Замечание: Прочитайте весь урок прежде чем выполнять любые команды!! ++ ++ 1. Удерживая клавишу Ctrl нажмите g . Внизу экрана появится строка статуса с ++ именем файла и номером строки, в которой Вы находитесь. Запомните номер ++ строки, он потребуется на Шаге 3. ++ ++ 2. Нажмите shift-G для перемещения к концу файла. ++ ++ 3. Наберите номер строки, в которой вы находились и затем shift-G. Это ++ вернет Вас к строке, в которой Вы были, когда в первый раз нажали Ctrl-g. ++ (Когда Вы будете набирать цифры, они НЕ отобразятся на экране.) ++ ++ 4. Если Вы запомнили все вышесказанное, выполните шаги 1--3. ++ ++ ++ ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ ++ Урок 4.2: КОМАНДА ПОИСКА ++ ++ ** Наберите / и затем введите искомую фразу. ** ++ ++ 1. В обычном режиме (Normal mode) наберите символ / . Обратите внимание, ++ что он вместе с курсором появится внизу экрана, как это происходит с ++ командой : . ++ ++ 2. Теперь наберите 'ошшшибка' . Это то слово, которое Вы будете ++ искать. ++ ++ 3. Для того, чтобы повторить поиск, просто нажмите n . ++ Для поиска этой фразы в обратном направлении, нажмите Shift-N . ++ ++ 4. Если Вы желаете сразу искать в обратном направлении, используйте ++ команду ? вместо / . ++ ++ ---> Когда Вы при поиске достигнете конца файла, поиск будет продолжен с ++ начала. ++ ++ "ошшшибка" это не способ произнесения слова `ошибка'; ошшшибка это ошибка. ++ ++ ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ ++ Урок 4.3: ПОИСК ПАРНЫХ СКОБОК ++ ++ ++ ** Наберите % для поиска парных ),] или } . ** ++ ++ 1. Поместите курсор над любой из (, [ или { в строке внизу, помеченной --->. ++ ++ 2. Теперь наберите символ % . ++ ++ 3. Курсор должен перескочить на парную скобку. ++ ++ 4. Наберите % для возврата курсора назад к первой скобке. ++ ++ ---> Это ( строка, содержащая такие (, такие [ ] и такие { } скобки. )) ++ ++ Замечание: Это очень удобно при отладке программ с пропущенными скобками! ++ ++ ++ ++ ++ ++ ++ ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ ++ Урок 4.4: СПОСОБ ИСПРАВЛЕНИЯ ОШИБОК ++ ++ ++ ** Наберите :s/было/стало/g для замены 'было' на 'стало'. ** ++ ++ 1. Переместите курсор вниз, к строке, помеченной --->. ++ ++ 2. Наберите :s/уводю/увожу . Обратите внимание на то, что эта команда ++ заменит только первое найденное вхождение в строке. ++ ++ 3. Теперь наберите :s/уводю/увожу/g , означающее подстановку глобально во ++ всей строке. Это заменит все найденные в строке вхождения. ++ ++ ---> Я уводю к отверженным селеньям, я уводю сквозь вековечный стон, я уводю к ++ забытым поколеньям. ++ ++ 4. Для замены всех вхождений последовательности символов между двумя ++ строками, ++ наберите :#,#s/было/стало/g где #,# --- номера этих строк. ++ Наберите :%s/было/стало/g для замены всех вхождений во всем файле. ++ ++ ++ ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ ++ РЕЗЮМЕ УРОКА 4 ++ 1. Ctrl-g показывает ваше положение в файле и информацию о нем. ++ Shift-G перемещает Вас в конец файла. Номер, за которым следует Shift-G ++ позволяет перейти к строке с этим номером. ++ ++ 2. Нажатие / и затем ввод строки позволяет произвести поиск этой строки ++ ВПЕРЕД по тексту. ++ Нажатие ? и затем ввод строки позволяет произвести поиск этой строки ++ НАЗАД по тексту. ++ После поиска наберите n для перехода к следующему вхождению искомой ++ строки в том же направлении или Shift-N для перехода в противоположном ++ направлении. ++ ++ 3. Нажатие % , когда курсор находится на (,),[,],{, или } позволяет найти ++ парную скобку. ++ ++ 4. Для подстановки `стало' вместо первого `было' в строке, наберите ++ :s/old/new ++ Для подстановки `стало' вместо всех `было' в строке, наберите ++ :s/old/new/g ++ Для замены в интервале между двумя строками, наберите ++ :#,#s/old/new/g ++ Для замены всех вхождений `было' на `стало' в файле, наберите ++ :%s/old/new/g ++ Чтобы редактор каждый раз запрашивал подтверждение, добавьте 'c' ++ :%s/old/new/gc ++ ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ ++ Урок 5.1: КАК ВЫПОЛНИТЬ ВНЕШНЮЮ КОМАНДУ ++ ++ ++ ** Наберите :! и затем внешнюю команду, которую следует выполнить. ** ++ ++ 1. Наберите уже знакомую Вам команду : для установки курсора в командную ++ строку редактора. Это позволит Вам ввести команду. ++ ++ 2. Теперь наберите символ ! (восклицательный знак). Теперь можно исполнить ++ внешнюю команду, используя командную оболочку. ++ ++ 3. Для примера наберите ls после ! и нажмите . Эта команда выведет ++ список файлов в текущем каталоге, точно также, как если бы Вы ввели эту ++ команду в приглашении оболочки. Или попробуйте :!dir , если предыдущая ++ команда не сработала. ++ ++ ---> Замечание: Таким способом можно выполнить любую внешнюю команду. ++ ++ ---> Замечание: Все команды, начинающиеся с : , должны завершаться нажатием ++ . ++ ++ ++ ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ ++ Урок 5.2: КАК ЗАПИСАТЬ ФАЙЛ ++ ++ ++ ** Для сохранения изменений, произведенных в файле, наберите :w ИМЯ_ФАЙЛА. ** ++ ++ 1. Наберите :!dir или :!ls для получения списка файлов в текущем каталоге. ++ Как Вам уже известно, Вы должны нажать после ввода этих команд. ++ ++ 2. Придумайте название для файла, которое еще не существует, например TEST. ++ ++ 3. Теперь наберите :w TEST (где TEST --- это имя файла, придуманное Вами.) ++ ++ 4. Эта команда сохранит весь файл (Учебник по Vim) под именем TEST. Чтобы ++ удостовериться в этом, снова наберите :!dir и просмотрите каталог. ++ ++ ---> Заметьте, что если Вы выйдете из Vim и затем запустите его снова с ++ файлом TEST, этот файл будет точной копией учебника в тот момент, когда ++ Вы его сохранили. ++ ++ 5. Теперь удалите этот файл, набрав :!del TEST ++ ++ ++ ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ ++ Урок 5.3: ВЫБОРОЧНОЕ СОХРАНЕНИЕ ++ ++ ++ ** Для сохранения части файла, наберите :#,# w ИМЯ_ФАЙЛА ** ++ ++ 1. Еще раз наберите :!dir или :!ls для получения списка файлов в текущем ++ каталоге и выберите подходящее имя, например TEST. ++ ++ 2. Переместите курсор к началу этой страницы и нажмите Ctrl-g для нахождения ++ номера строкиto. ЗАПОМНИТЕ ЭТОТ НОМЕР! ++ ++ 3. Теперь переместитесь в конец страницы и вновь наберите Ctrl-g. ЗАПОМНИТЕ ++ И ЭТОТ НОМЕР ТОЖЕ! ++ ++ 4. Для сохранения ТОЛЬКО ЧАСТИ файла наберите :#,# w TEST , где #,# --- это ++ номера, которые Вы запомнили (начало, конец), а TEST --- имя вашего файла. ++ ++ 5. Как и прежде, убедитесь в наличии этого файла командой :!dir , но НЕ ++ УДАЛЯЙТЕ его. ++ ++ ++ ++ ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ ++ Урок 5.4: ЧТЕНИЕ И ОБЪЕДИНЕНИЕ ФАЙЛОВ ++ ++ ** Для вставки содержимого файла, наберите :r FILENAME ** ++ ++ 1. Наберите :!dir для того, чтобы убедиться в том, что файл TEST все еще ++ существует. ++ ++ 2. Установите курсор в верхней части этой страницы. ++ ++ Замечание: После выполнения шага 3 Вы увидите Урок 5.3. После этого ++ перемещайтесь ВНИЗ, снова к этому уроку. ++ ++ 3. Теперь прочитайте Ваш файл TEST, используя команду :r TEST , где ++ TEST --- это имя файла. ++ ++ Замечание: Прочитанный Вами файл будет вставлен в том месте, где находится ++ курсор. ++ ++ 4. Чтобы убедиться в том, что файл прочитан, переместитесь немного назад по ++ тексту и заметьте, что теперь существуют две копии Урока 5.3, исходная ++ и полученная из файла. ++ ++ ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ ++ РЕЗЮМЕ УРОКА 5 ++ ++ ++ 1. :!команда исполняет внешнюю команду. ++ ++ Некоторые полезные примеры: ++ :!dir --- выводит список файлов в каталоге. ++ :!del FILENAME --- удаляет файл FILENAME. ++ ++ 2. :w FILENAME записывает текущий редактируемый файл на диск ++ под именем FILENAME. ++ ++ 3. :#,#w FILENAME сохраняет строки от # до # в файл FILENAME. ++ ++ 4. :r FILENAME считывает с диска файл FILENAME и помещает его в текущий ++ файл следом за позицией курсора. ++ ++ ++ ++ ++ ++ ++ ++ ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ ++ Урок 6.1: КОМАНДА СОЗДАНИЯ ++ ++ ++ ** Наберите o чтобы создать пустую строку под курсором и перейти в режим ++ вставки (Insert mode) ** ++ ++ 1. Переместите курсор вниз, к строке, помеченной --->. ++ ++ 2. Наберите o (в нижнем регистре) для того, чтобы создать пустую строку ++ НИЖЕ курсора и перейти в режим вставки (Insert mode). ++ ++ 3. Теперь скопируйте помеченную ---> строку и нажмите для выхода из ++ режима вставки. ++ ++ ---> После нажатия o курсор перейдет на новую пустую строку в режиме вставки. ++ ++ 4. Для создания строки ВЫШЕ курсора, просто наберите заглавную O, вместо ++ строчной o. Попробуйте проделать это с нижеследующей строкой. ++ Создайте новую строку над этой, нажав Shift-O, поместив курсор на эту строку. ++ ++ ++ ++ ++ ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ ++ Урок 6.2: КОМАНДА ДОБАВЛЕНИЯ ++ ++ ** Наберите a , чтобы вставить текст ПОСЛЕ курсора. ** ++ ++ 1. Переместите курсор вниз, в конец первой строки, помеченной ---> , ++ набрав $ в обычном режиме (Normal mode). ++ ++ 2. Наберите a (в нижнем регистре) для добавления текста ПОСЛЕ символа, ++ находящегося под курсором. (Заглавная A позволяет добавить в конец ++ строки.) ++ ++ Замечание: Это позволяет избежать нажатия i , последнего символа, текста для ++ вставки, , курсор-вправо, и, наконец, x , просто для того, ++ чтобы добавить тест в конец строки! ++ ++ 3. Теперь завершите первую строку. Заметьте также, что добавление это в ++ точности то же самое, что и режим вставки, за исключением позиции, в ++ которую будет вставлен текст. ++ ++ ---> Эта строчка позволит Вам попрактиковаться ++ ---> Эта строчка позволит Вам попрактиковаться в добавлении текста в конец ++ строки. ++ ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ ++ Урок 6.3: ЕЩЕ ОДИН СПОСОБ ЗАМЕНЫ ++ ++ ++ ** Наберите заглавную R для замены более, чем одного символа. ** ++ ++ 1. Переместите курсор вниз, к строке, помеченной --->. ++ ++ 2. Расположите курсор в начале первого слова, отличающегося от ++ соответствующего в следующей строке, помеченной ---> (слово 'последней'). ++ ++ 3. Теперь наберите R и замените остаток текста в первой строке, набрав ++ поверх старого текста так, чтобы обе строки стали одинаковыми. ++ ++ ---> Первую строку можно сравнять с последней, используя клавиши. ++ ---> Первую строку можно сравнять с второй, используя R и набрав новый текст. ++ ++ 4. Обратите внимание, что при нажатии для завершения, любой ++ не измененный текст сохранится. ++ ++ ++ ++ ++ ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ ++ Урок 6.4: УСТАНОВКА ПАРАМЕТРОВ ++ ++ ++ ** Установим параметры так, чтобы игнорировать регистр при поиске или замене ** ++ ++ ++ 1. Поищите слово 'игнорировать', набрав: ++ /игнорировать ++ Повторите поиск несколько раз, нажимая клавишу n ++ ++ 2. Включите параметр 'ic' (Игнорировать регистр), набрав: ++ :set ic ++ ++ 3. Теперь снова сделайте поиск слова 'игнорировать', нажав: n ++ Повторите поиск несколько раз, нажимая клавишу n ++ ++ 4. Включите параметры 'hlsearch' и 'incsearch': ++ :set hls is ++ ++ 5. Теперь опять введите команду поиска и посмотрите, что получится: ++ /игнорировать ++ ++ ++ ++ ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ ++ РЕЗЮМЕ УРОКА 6 ++ ++ ++ 1. Нажатие o создает строку НИЖЕ курсора и перемещает курсор в нее в режиме ++ вставки. ++ Нажатие заглавной O создает строку ВЫШЕ строки, в которой находится ++ курсор. ++ ++ 2. Наберите a для вставки текста ПОСЛЕ символа, на котором находится курсор. ++ Нажатие заглавной A автоматически перемещает Вас для добавления текста ++ в конец строки. ++ ++ 3. Нажатие заглавной R переводит Вас в режим замены до тех пор, пока не ++ будет нажата клавиша для завершения. ++ ++ 4. Набрав ":set xxx" вы сможете включить параметр "xxx" ++ ++ ++ ++ ++ ++ ++ ++ ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ ++ Урок 7: КОМАНДЫ ПОЛУЧЕНИЯ ВСТРОЕННОЙ СПРАВКИ ++ ++ ** Используйте встроенную справочную систему ** ++ ++ Vim обладает мощной встроенной справочной системой. Для начала попробуйте ++ один из трех вариантов: ++ - нажмите клавишу (если таковая имеется на клавиатуре) ++ - нажмите клавишу (если таковая имеется на клавиатуре) ++ - наберите :help ++ ++ Наберите :q чтобы закрыть окно справки. ++ ++ Вы можете найти справку для любого понятия или команды, просто задав ++ соответствующий аргумент команде ":help". Попробуйте следующее (не забудьте ++ нажать ): ++ ++ :help w ++ :help c_, 2002. ++ Translator: Andrey Kiselev , 2002. ++ ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ +*** ../vim-7.0.079/src/version.c Sat Sep 2 14:53:09 2006 +--- src/version.c Sat Sep 2 14:20:15 2006 +*************** +*** 668,669 **** +--- 668,671 ---- + { /* Add new patch number below this line */ ++ /**/ ++ 79, + /**/ + +-- +Eight Megabytes And Continually Swapping. + + /// Bram Moolenaar -- Bram@Moolenaar.net -- http://www.Moolenaar.net \\\ +/// sponsor Vim, vote for features -- http://www.Vim.org/sponsor/ \\\ +\\\ download, build and distribute -- http://www.A-A-P.org /// + \\\ help me help AIDS victims -- http://ICCF-Holland.org /// --- vim-7.0.orig/upstream/patches/7.0.035 +++ vim-7.0/upstream/patches/7.0.035 @@ -0,0 +1,205 @@ +To: vim-dev@vim.org +Subject: Patch 7.0.035 +Fcc: outbox +From: Bram Moolenaar +Mime-Version: 1.0 +Content-Type: text/plain; charset=ISO-8859-1 +Content-Transfer-Encoding: 8bit +------------ + +Patch 7.0.035 +Problem: Insert mode completion works when typed but not when replayed from + a register. (Hari Krishna Dara) + Also: Mappings for Insert mode completion don't always work. +Solution: When finding a non-completion key in the input don't interrupt + completion when it wasn't typed. + Do use mappings when checking for typeahead while still finding + completions. Avoids that completion is interrupted too soon. + Use "compl_pending" in a different way. +Files: src/edit.c + + +*** ../vim-7.0.034/src/edit.c Fri Jun 23 17:59:26 2006 +--- src/edit.c Fri Jun 23 21:32:42 2006 +*************** +*** 4166,4173 **** + { + if (compl_shows_dir == FORWARD && compl_shown_match->cp_next != NULL) + { +- if (compl_pending != 0) +- --compl_pending; + compl_shown_match = compl_shown_match->cp_next; + found_end = (compl_first_match != NULL + && (compl_shown_match->cp_next == compl_first_match +--- 4166,4171 ---- +*************** +*** 4176,4189 **** + else if (compl_shows_dir == BACKWARD + && compl_shown_match->cp_prev != NULL) + { +- if (compl_pending != 0) +- ++compl_pending; + found_end = (compl_shown_match == compl_first_match); + compl_shown_match = compl_shown_match->cp_prev; + found_end |= (compl_shown_match == compl_first_match); + } + else + { + if (advance) + { + if (compl_shows_dir == BACKWARD) +--- 4174,4197 ---- + else if (compl_shows_dir == BACKWARD + && compl_shown_match->cp_prev != NULL) + { + found_end = (compl_shown_match == compl_first_match); + compl_shown_match = compl_shown_match->cp_prev; + found_end |= (compl_shown_match == compl_first_match); + } + else + { ++ if (!allow_get_expansion) ++ { ++ if (advance) ++ { ++ if (compl_shows_dir == BACKWARD) ++ compl_pending -= todo + 1; ++ else ++ compl_pending += todo + 1; ++ } ++ return -1; ++ } ++ + if (advance) + { + if (compl_shows_dir == BACKWARD) +*************** +*** 4191,4204 **** + else + ++compl_pending; + } +- if (!allow_get_expansion) +- return -1; + + /* Find matches. */ + num_matches = ins_compl_get_exp(&compl_startpos); +! if (compl_pending != 0 && compl_direction == compl_shows_dir + && advance) +! compl_shown_match = compl_curr_match; + found_end = FALSE; + } + if ((compl_shown_match->cp_flags & ORIGINAL_TEXT) == 0 +--- 4199,4225 ---- + else + ++compl_pending; + } + + /* Find matches. */ + num_matches = ins_compl_get_exp(&compl_startpos); +! +! /* handle any pending completions */ +! while (compl_pending != 0 && compl_direction == compl_shows_dir + && advance) +! { +! if (compl_pending > 0 && compl_shown_match->cp_next != NULL) +! { +! compl_shown_match = compl_shown_match->cp_next; +! --compl_pending; +! } +! if (compl_pending < 0 && compl_shown_match->cp_prev != NULL) +! { +! compl_shown_match = compl_shown_match->cp_prev; +! ++compl_pending; +! } +! else +! break; +! } + found_end = FALSE; + } + if ((compl_shown_match->cp_flags & ORIGINAL_TEXT) == 0 +*************** +*** 4307,4315 **** + return; + count = 0; + +! ++no_mapping; + c = vpeekc_any(); +- --no_mapping; + if (c != NUL) + { + if (vim_is_ctrl_x_key(c) && c != Ctrl_X && c != Ctrl_R) +--- 4328,4336 ---- + return; + count = 0; + +! /* Check for a typed key. Do use mappings, otherwise vim_is_ctrl_x_key() +! * can't do its work correctly. */ + c = vpeekc_any(); + if (c != NUL) + { + if (vim_is_ctrl_x_key(c) && c != Ctrl_X && c != Ctrl_R) +*************** +*** 4319,4330 **** + (void)ins_compl_next(FALSE, ins_compl_key2count(c), + c != K_UP && c != K_DOWN); + } +! else if (c != Ctrl_R) +! compl_interrupted = TRUE; + } + if (compl_pending != 0 && !got_int) +! (void)ins_compl_next(FALSE, compl_pending > 0 +! ? compl_pending : -compl_pending, TRUE); + } + + /* +--- 4340,4366 ---- + (void)ins_compl_next(FALSE, ins_compl_key2count(c), + c != K_UP && c != K_DOWN); + } +! else +! { +! /* Need to get the character to have KeyTyped set. We'll put it +! * back with vungetc() below. */ +! c = safe_vgetc(); +! +! /* Don't interrupt completion when the character wasn't typed, +! * e.g., when doing @q to replay keys. */ +! if (c != Ctrl_R && KeyTyped) +! compl_interrupted = TRUE; +! +! vungetc(c); +! } + } + if (compl_pending != 0 && !got_int) +! { +! int todo = compl_pending > 0 ? compl_pending : -compl_pending; +! +! compl_pending = 0; +! (void)ins_compl_next(FALSE, todo, TRUE); +! } + } + + /* +*** ../vim-7.0.034/src/version.c Fri Jun 23 17:59:26 2006 +--- src/version.c Fri Jun 23 21:35:39 2006 +*************** +*** 668,669 **** +--- 668,671 ---- + { /* Add new patch number below this line */ ++ /**/ ++ 35, + /**/ + +-- +So when I saw the post to comp.editors, I rushed over to the FTP site to +grab it. So I yank apart the tarball, light x candles, where x= the +vim version multiplied by the md5sum of the source divided by the MAC of +my NIC (8A3FA78155A8A1D346C3C4A), put on black robes, dim the lights, +wave a dead chicken over the hard drive, and summon the power of GNU GCC +with the magic words "make config ; make!". + [Jason Spence, compiling Vim 5.0] + + /// Bram Moolenaar -- Bram@Moolenaar.net -- http://www.Moolenaar.net \\\ +/// sponsor Vim, vote for features -- http://www.Vim.org/sponsor/ \\\ +\\\ download, build and distribute -- http://www.A-A-P.org /// + \\\ help me help AIDS victims -- http://ICCF-Holland.org /// --- vim-7.0.orig/upstream/patches/7.0.032 +++ vim-7.0/upstream/patches/7.0.032 @@ -0,0 +1,53 @@ +To: vim-dev@vim.org +Subject: Patch 7.0.032 (extra) +Fcc: outbox +From: Bram Moolenaar +Mime-Version: 1.0 +Content-Type: text/plain; charset=ISO-8859-1 +Content-Transfer-Encoding: 8bit +------------ + +Patch 7.0.032 (extra, after 7.0.027) +Problem: Missing semicolon. +Solution: Add the semicolon. +Files: src/gui_w48.c + + +*** ../vim-7.0.031/src/gui_w48.c Thu Jun 22 19:34:23 2006 +--- src/gui_w48.c Fri Jun 23 16:36:09 2006 +*************** +*** 1665,1671 **** + } + if (msg.message == WM_USER) + { +! MyTranslateMessage(&msg) + DispatchMessage(&msg); + return; + } +--- 1665,1671 ---- + } + if (msg.message == WM_USER) + { +! MyTranslateMessage(&msg); + DispatchMessage(&msg); + return; + } +*** ../vim-7.0.031/src/version.c Fri Jun 23 16:33:41 2006 +--- src/version.c Fri Jun 23 16:37:24 2006 +*************** +*** 668,669 **** +--- 668,671 ---- + { /* Add new patch number below this line */ ++ /**/ ++ 32, + /**/ + +-- +Snoring is prohibited unless all bedroom windows are closed and securely +locked. + [real standing law in Massachusetts, United States of America] + + /// Bram Moolenaar -- Bram@Moolenaar.net -- http://www.Moolenaar.net \\\ +/// sponsor Vim, vote for features -- http://www.Vim.org/sponsor/ \\\ +\\\ download, build and distribute -- http://www.A-A-P.org /// + \\\ help me help AIDS victims -- http://ICCF-Holland.org /// --- vim-7.0.orig/upstream/patches/7.0.005 +++ vim-7.0/upstream/patches/7.0.005 @@ -0,0 +1,56 @@ +To: vim-dev@vim.org +Subject: Patch 7.0.005 (extra) +Fcc: outbox +From: Bram Moolenaar +Mime-Version: 1.0 +Content-Type: text/plain; charset=ISO-8859-1 +Content-Transfer-Encoding: 8bit +------------ + +Patch 7.0.005 (extra) +Problem: Win32: The installer doesn't remove the "autoload" and "spell" + directories. (David Fishburn) +Solution: Add the directories to the list to be removed. +Files: nsis/gvim.nsi + + +*** ../vim-7.0.004/nsis/gvim.nsi Wed May 10 15:22:50 2006 +--- nsis/gvim.nsi Mon May 8 17:57:28 2006 +*************** +*** 391,396 **** +--- 391,397 ---- + ClearErrors + # Remove everything but *.dll files. Avoids that + # a lot remains when gvimext.dll cannot be deleted. ++ RMDir /r $0\autoload + RMDir /r $0\colors + RMDir /r $0\compiler + RMDir /r $0\doc +*************** +*** 398,403 **** +--- 399,405 ---- + RMDir /r $0\indent + RMDir /r $0\macros + RMDir /r $0\plugin ++ RMDir /r $0\spell + RMDir /r $0\syntax + RMDir /r $0\tools + RMDir /r $0\tutor +*** ../vim-7.0.004/src/version.c Wed May 10 17:15:05 2006 +--- src/version.c Wed May 10 17:24:02 2006 +*************** +*** 668,669 **** +--- 668,671 ---- + { /* Add new patch number below this line */ ++ /**/ ++ 5, + /**/ + +-- +From "know your smileys": + :-& Eating spaghetti + + /// Bram Moolenaar -- Bram@Moolenaar.net -- http://www.Moolenaar.net \\\ +/// sponsor Vim, vote for features -- http://www.Vim.org/sponsor/ \\\ +\\\ download, build and distribute -- http://www.A-A-P.org /// + \\\ help me help AIDS victims -- http://ICCF-Holland.org /// --- vim-7.0.orig/upstream/patches/7.0.106 +++ vim-7.0/upstream/patches/7.0.106 @@ -0,0 +1,150 @@ +To: vim-dev@vim.org +Subject: Patch 7.0.106 +Fcc: outbox +From: Bram Moolenaar +Mime-Version: 1.0 +Content-Type: text/plain; charset=ISO-8859-1 +Content-Transfer-Encoding: 8bit +------------ + +Patch 7.0.106 +Problem: The spell popup menu uses ":amenu", triggering mappings. Other + PopupMenu autocommands are removed. (John Little) +Solution: Use ":anoremenu" and use an autocmd group. +Files: runtime/menu.vim + + +*** ../vim-7.0.105/runtime/menu.vim Tue Apr 18 00:06:31 2006 +--- runtime/menu.vim Thu Sep 14 13:14:25 2006 +*************** +*** 2,8 **** + " You can also use this as a start for your own set of menus. + " + " Maintainer: Bram Moolenaar +! " Last Change: 2006 Apr 17 + + " Note that ":an" (short for ":anoremenu") is often used to make a menu work + " in all modes and avoid side effects from mappings defined by the user. +--- 2,8 ---- + " You can also use this as a start for your own set of menus. + " + " Maintainer: Bram Moolenaar +! " Last Change: 2006 Sep 14 + + " Note that ":an" (short for ":anoremenu") is often used to make a menu work + " in all modes and avoid side effects from mappings defined by the user. +*************** +*** 885,890 **** +--- 885,892 ---- + if exists("s:changeitem") && s:changeitem != '' + call SpellDel() + endif ++ ++ " Return quickly if spell checking is not enabled. + if !&spell || &spelllang == '' + return + endif +*************** +*** 908,925 **** + let s:fromword = w + let pri = 1 + for sug in s:suglist +! exe 'amenu 1.5.' . pri . ' PopUp.' . s:changeitem . '.' . escape(sug, ' .') + \ . ' :call SpellReplace(' . pri . ')' + let pri += 1 + endfor + + let s:additem = 'add\ "' . escape(w, ' .') . '"\ to\ word\ list' +! exe 'amenu 1.6 PopUp.' . s:additem . ' :spellgood ' . w . '' + + let s:ignoreitem = 'ignore\ "' . escape(w, ' .') . '"' +! exe 'amenu 1.7 PopUp.' . s:ignoreitem . ' :spellgood! ' . w . '' + +! amenu 1.8 PopUp.-SpellSep- : + endif + endif + endfunc +--- 910,927 ---- + let s:fromword = w + let pri = 1 + for sug in s:suglist +! exe 'anoremenu 1.5.' . pri . ' PopUp.' . s:changeitem . '.' . escape(sug, ' .') + \ . ' :call SpellReplace(' . pri . ')' + let pri += 1 + endfor + + let s:additem = 'add\ "' . escape(w, ' .') . '"\ to\ word\ list' +! exe 'anoremenu 1.6 PopUp.' . s:additem . ' :spellgood ' . w . '' + + let s:ignoreitem = 'ignore\ "' . escape(w, ' .') . '"' +! exe 'anoremenu 1.7 PopUp.' . s:ignoreitem . ' :spellgood! ' . w . '' + +! anoremenu 1.8 PopUp.-SpellSep- : + endif + endif + endfunc +*************** +*** 938,944 **** + let s:changeitem = '' + endfun + +! au! MenuPopup * call SpellPopup() + endif + + " The GUI toolbar (for MS-Windows and GTK) +--- 940,948 ---- + let s:changeitem = '' + endfun + +! augroup SpellPopupMenu +! au! MenuPopup * call SpellPopup() +! augroup END + endif + + " The GUI toolbar (for MS-Windows and GTK) +*************** +*** 1013,1021 **** + tmenu ToolBar.FindPrev Find Previous + tmenu ToolBar.Replace Find / Replace... + endif +! tmenu ToolBar.LoadSesn Chose a session to load + tmenu ToolBar.SaveSesn Save current session +! tmenu ToolBar.RunScript Chose a Vim Script to run + tmenu ToolBar.Make Make current project (:make) + tmenu ToolBar.RunCtags Build tags in current directory tree (!ctags -R .) + tmenu ToolBar.TagJump Jump to tag under cursor +--- 1017,1025 ---- + tmenu ToolBar.FindPrev Find Previous + tmenu ToolBar.Replace Find / Replace... + endif +! tmenu ToolBar.LoadSesn Choose a session to load + tmenu ToolBar.SaveSesn Save current session +! tmenu ToolBar.RunScript Choose a Vim Script to run + tmenu ToolBar.Make Make current project (:make) + tmenu ToolBar.RunCtags Build tags in current directory tree (!ctags -R .) + tmenu ToolBar.TagJump Jump to tag under cursor +*** ../vim-7.0.105/src/version.c Thu Sep 14 11:27:12 2006 +--- src/version.c Thu Sep 14 13:24:44 2006 +*************** +*** 668,669 **** +--- 668,671 ---- + { /* Add new patch number below this line */ ++ /**/ ++ 106, + /**/ + +-- +BROTHER MAYNARD: Armaments Chapter Two Verses Nine to Twenty One. +ANOTHER MONK: And St. Attila raised his hand grenade up on high saying "O + Lord bless this thy hand grenade that with it thou mayest + blow thine enemies to tiny bits, in thy mercy. "and the Lord + did grin and people did feast upon the lambs and sloths and + carp and anchovies and orang-utans and breakfast cereals and + fruit bats and... +BROTHER MAYNARD: Skip a bit brother ... + "Monty Python and the Holy Grail" PYTHON (MONTY) PICTURES LTD + + /// Bram Moolenaar -- Bram@Moolenaar.net -- http://www.Moolenaar.net \\\ +/// sponsor Vim, vote for features -- http://www.Vim.org/sponsor/ \\\ +\\\ download, build and distribute -- http://www.A-A-P.org /// + \\\ help me help AIDS victims -- http://ICCF-Holland.org /// --- vim-7.0.orig/upstream/patches/7.0.164 +++ vim-7.0/upstream/patches/7.0.164 @@ -0,0 +1,55 @@ +To: vim-dev@vim.org +Subject: Patch 7.0.164 +Fcc: outbox +From: Bram Moolenaar +Mime-Version: 1.0 +Content-Type: text/plain; charset=ISO-8859-1 +Content-Transfer-Encoding: 8bit +------------ + +Patch 7.0.164 +Problem: ":redir @+" doesn't work. +Solution: Accept "@+" just like "@*". (Yegappan Lakshmanan) +Files: src/ex_docmd.c + + +*** ../vim-7.0.163/src/ex_docmd.c Tue Nov 7 18:43:10 2006 +--- src/ex_docmd.c Tue Nov 14 20:17:42 2006 +*************** +*** 8371,8376 **** +--- 8371,8377 ---- + if (ASCII_ISALPHA(*arg) + # ifdef FEAT_CLIPBOARD + || *arg == '*' ++ || *arg == '+' + # endif + || *arg == '"') + { +*************** +*** 8381,8386 **** +--- 8382,8388 ---- + (islower(redir_reg) + # ifdef FEAT_CLIPBOARD + || redir_reg == '*' ++ || redir_reg == '+' + # endif + || redir_reg == '"')) + { +*** ../vim-7.0.163/src/version.c Tue Nov 14 18:29:00 2006 +--- src/version.c Tue Nov 14 20:23:38 2006 +*************** +*** 668,669 **** +--- 668,671 ---- + { /* Add new patch number below this line */ ++ /**/ ++ 164, + /**/ + +-- +hundred-and-one symptoms of being an internet addict: +232. You start conversations with, "Have you gotten an ISDN line?" + + /// Bram Moolenaar -- Bram@Moolenaar.net -- http://www.Moolenaar.net \\\ +/// sponsor Vim, vote for features -- http://www.Vim.org/sponsor/ \\\ +\\\ download, build and distribute -- http://www.A-A-P.org /// + \\\ help me help AIDS victims -- http://ICCF-Holland.org /// --- vim-7.0.orig/upstream/patches/7.0.022 +++ vim-7.0/upstream/patches/7.0.022 @@ -0,0 +1,234 @@ +To: vim-dev@vim.org +Subject: Patch 7.0.022 +Fcc: outbox +From: Bram Moolenaar +Mime-Version: 1.0 +Content-Type: text/plain; charset=ISO-8859-1 +Content-Transfer-Encoding: 8bit +------------ + +Patch 7.0.022 +Problem: Using buffer.append() in Ruby may append the line to the wrong + buffer. (Alex Norman) +Solution: Properly switch to the buffer to do the appending. Also for + buffer.delete() and setting a buffer line. +Files: src/if_ruby.c + + +*** ../vim-7.0.021/src/if_ruby.c Sun Apr 30 20:25:42 2006 +--- src/if_ruby.c Tue Jun 20 21:01:23 2006 +*************** +*** 643,653 **** + + static VALUE set_buffer_line(buf_T *buf, linenr_T n, VALUE str) + { +! buf_T *savebuf = curbuf; +! char *line = STR2CSTR(str); + +! if (n > 0 && n <= buf->b_ml.ml_line_count && line != NULL) { + curbuf = buf; + if (u_savesub(n) == OK) { + ml_replace(n, (char_u *)line, TRUE); + changed(); +--- 643,665 ---- + + static VALUE set_buffer_line(buf_T *buf, linenr_T n, VALUE str) + { +! char *line = STR2CSTR(str); +! #ifdef FEAT_AUTOCMD +! aco_save_T aco; +! #else +! buf_T *save_curbuf = curbuf; +! #endif + +! if (n > 0 && n <= buf->b_ml.ml_line_count && line != NULL) +! { +! #ifdef FEAT_AUTOCMD +! /* set curwin/curbuf for "buf" and save some things */ +! aucmd_prepbuf(&aco, buf); +! #else + curbuf = buf; ++ curwin->w_buffer = buf; ++ #endif ++ + if (u_savesub(n) == OK) { + ml_replace(n, (char_u *)line, TRUE); + changed(); +*************** +*** 655,664 **** + syn_changed(n); /* recompute syntax hl. for this line */ + #endif + } +! curbuf = savebuf; + update_curbuf(NOT_VALID); + } +! else { + rb_raise(rb_eIndexError, "index %d out of buffer", n); + return Qnil; /* For stop warning */ + } +--- 667,685 ---- + syn_changed(n); /* recompute syntax hl. for this line */ + #endif + } +! +! #ifdef FEAT_AUTOCMD +! /* restore curwin/curbuf and a few other things */ +! aucmd_restbuf(&aco); +! /* Careful: autocommands may have made "buf" invalid! */ +! #else +! curwin->w_buffer = save_curbuf; +! curbuf = save_curbuf; +! #endif + update_curbuf(NOT_VALID); + } +! else +! { + rb_raise(rb_eIndexError, "index %d out of buffer", n); + return Qnil; /* For stop warning */ + } +*************** +*** 676,687 **** + + static VALUE buffer_delete(VALUE self, VALUE num) + { +! buf_T *buf = get_buf(self); +! buf_T *savebuf = curbuf; +! long n = NUM2LONG(num); + +! if (n > 0 && n <= buf->b_ml.ml_line_count) { + curbuf = buf; + if (u_savedel(n, 1) == OK) { + ml_delete(n, 0); + +--- 697,720 ---- + + static VALUE buffer_delete(VALUE self, VALUE num) + { +! buf_T *buf = get_buf(self); +! long n = NUM2LONG(num); +! #ifdef FEAT_AUTOCMD +! aco_save_T aco; +! #else +! buf_T *save_curbuf = curbuf; +! #endif + +! if (n > 0 && n <= buf->b_ml.ml_line_count) +! { +! #ifdef FEAT_AUTOCMD +! /* set curwin/curbuf for "buf" and save some things */ +! aucmd_prepbuf(&aco, buf); +! #else + curbuf = buf; ++ curwin->w_buffer = buf; ++ #endif ++ + if (u_savedel(n, 1) == OK) { + ml_delete(n, 0); + +*************** +*** 691,700 **** + + changed(); + } +! curbuf = savebuf; + update_curbuf(NOT_VALID); + } +! else { + rb_raise(rb_eIndexError, "index %d out of buffer", n); + } + return Qnil; +--- 724,742 ---- + + changed(); + } +! +! #ifdef FEAT_AUTOCMD +! /* restore curwin/curbuf and a few other things */ +! aucmd_restbuf(&aco); +! /* Careful: autocommands may have made "buf" invalid! */ +! #else +! curwin->w_buffer = save_curbuf; +! curbuf = save_curbuf; +! #endif + update_curbuf(NOT_VALID); + } +! else +! { + rb_raise(rb_eIndexError, "index %d out of buffer", n); + } + return Qnil; +*************** +*** 702,714 **** + + static VALUE buffer_append(VALUE self, VALUE num, VALUE str) + { +! buf_T *buf = get_buf(self); +! buf_T *savebuf = curbuf; +! char *line = STR2CSTR(str); +! long n = NUM2LONG(num); + +! if (n >= 0 && n <= buf->b_ml.ml_line_count && line != NULL) { + curbuf = buf; + if (u_inssub(n + 1) == OK) { + ml_append(n, (char_u *) line, (colnr_T) 0, FALSE); + +--- 744,768 ---- + + static VALUE buffer_append(VALUE self, VALUE num, VALUE str) + { +! buf_T *buf = get_buf(self); +! char *line = STR2CSTR(str); +! long n = NUM2LONG(num); +! #ifdef FEAT_AUTOCMD +! aco_save_T aco; +! #else +! buf_T *save_curbuf = curbuf; +! #endif + +! if (n >= 0 && n <= buf->b_ml.ml_line_count && line != NULL) +! { +! #ifdef FEAT_AUTOCMD +! /* set curwin/curbuf for "buf" and save some things */ +! aucmd_prepbuf(&aco, buf); +! #else + curbuf = buf; ++ curwin->w_buffer = buf; ++ #endif ++ + if (u_inssub(n + 1) == OK) { + ml_append(n, (char_u *) line, (colnr_T) 0, FALSE); + +*************** +*** 718,724 **** + + changed(); + } +! curbuf = savebuf; + update_curbuf(NOT_VALID); + } + else { +--- 772,786 ---- + + changed(); + } +! +! #ifdef FEAT_AUTOCMD +! /* restore curwin/curbuf and a few other things */ +! aucmd_restbuf(&aco); +! /* Careful: autocommands may have made "buf" invalid! */ +! #else +! curwin->w_buffer = save_curbuf; +! curbuf = save_curbuf; +! #endif + update_curbuf(NOT_VALID); + } + else { +*** ../vim-7.0.021/src/version.c Tue Jun 20 20:49:42 2006 +--- src/version.c Tue Jun 20 18:42:35 2006 +*************** +*** 668,669 **** +--- 668,671 ---- + { /* Add new patch number below this line */ ++ /**/ ++ 22, + /**/ --- vim-7.0.orig/upstream/patches/7.0.075 +++ vim-7.0/upstream/patches/7.0.075 @@ -0,0 +1,45 @@ +To: vim-dev@vim.org +Subject: Patch 7.0.075 +Fcc: outbox +From: Bram Moolenaar +Mime-Version: 1.0 +Content-Type: text/plain; charset=ISO-8859-1 +Content-Transfer-Encoding: 8bit +------------ + +Patch 7.0.075 +Problem: winsaveview() did not store the actual value of the desired cursor + column. This could move the cursor in the matchparen plugin. +Solution: Call update_curswant() before using the value w_curswant. +Files: src/eval.c + + +*** ../vim-7.0.074/src/eval.c Tue Aug 29 17:28:56 2006 +--- src/eval.c Tue Aug 29 21:53:26 2006 +*************** +*** 16232,16237 **** +--- 16232,16238 ---- + #ifdef FEAT_VIRTUALEDIT + dict_add_nr_str(dict, "coladd", (long)curwin->w_cursor.coladd, NULL); + #endif ++ update_curswant(); + dict_add_nr_str(dict, "curswant", (long)curwin->w_curswant, NULL); + + dict_add_nr_str(dict, "topline", (long)curwin->w_topline, NULL); +*** ../vim-7.0.074/src/version.c Tue Aug 29 21:30:15 2006 +--- src/version.c Tue Aug 29 21:57:03 2006 +*************** +*** 668,669 **** +--- 668,671 ---- + { /* Add new patch number below this line */ ++ /**/ ++ 75, + /**/ + +-- +Women are probably the main cause of free software starvation. + + /// Bram Moolenaar -- Bram@Moolenaar.net -- http://www.Moolenaar.net \\\ +/// sponsor Vim, vote for features -- http://www.Vim.org/sponsor/ \\\ +\\\ download, build and distribute -- http://www.A-A-P.org /// + \\\ help me help AIDS victims -- http://ICCF-Holland.org /// --- vim-7.0.orig/upstream/patches/7.0.044 +++ vim-7.0/upstream/patches/7.0.044 @@ -0,0 +1,211 @@ +To: vim-dev@vim.org +Subject: Patch 7.0.044 +Fcc: outbox +From: Bram Moolenaar +Mime-Version: 1.0 +Content-Type: text/plain; charset=ISO-8859-1 +Content-Transfer-Encoding: 8bit +------------ + +Patch 7.0.044 +Problem: Perl: setting a buffer line in another buffer may result in + changing the current buffer. +Solution: Properly change to the buffer to be changed. +Files: src/if_perl.xs + + +*** ../vim-7.0.043/src/if_perl.xs Tue Mar 7 00:18:16 2006 +--- src/if_perl.xs Thu Jun 22 21:22:18 2006 +*************** +*** 1056,1062 **** + int i; + long lnum; + char *line; +- buf_T *savebuf; + PPCODE: + if (buf_valid(vimbuf)) + { +--- 1056,1061 ---- +*************** +*** 1069,1082 **** + line = SvPV(ST(i),PL_na); + if (lnum > 0 && lnum <= vimbuf->b_ml.ml_line_count && line != NULL) + { +! savebuf = curbuf; + curbuf = vimbuf; + if (u_savesub(lnum) == OK) + { + ml_replace(lnum, (char_u *)line, TRUE); + changed_bytes(lnum, 0); + } +! curbuf = savebuf; + } + } + } +--- 1068,1098 ---- + line = SvPV(ST(i),PL_na); + if (lnum > 0 && lnum <= vimbuf->b_ml.ml_line_count && line != NULL) + { +! #ifdef FEAT_AUTOCMD +! aco_save_T aco; +! +! /* set curwin/curbuf for "vimbuf" and save some things */ +! aucmd_prepbuf(&aco, vimbuf); +! #else +! buf_T *save_curbuf = curbuf; +! + curbuf = vimbuf; ++ curwin->w_buffer = vimbuf; ++ #endif + if (u_savesub(lnum) == OK) + { + ml_replace(lnum, (char_u *)line, TRUE); + changed_bytes(lnum, 0); + } +! +! #ifdef FEAT_AUTOCMD +! /* restore curwin/curbuf and a few other things */ +! aucmd_restbuf(&aco); +! /* Careful: autocommands may have made "vimbuf" invalid! */ +! #else +! curwin->w_buffer = save_curbuf; +! curbuf = save_curbuf; +! #endif + } + } + } +*************** +*** 1087,1093 **** + + PREINIT: + long i, lnum = 0, count = 0; +- buf_T *savebuf; + PPCODE: + if (buf_valid(vimbuf)) + { +--- 1103,1108 ---- +*************** +*** 1114,1129 **** + { + if (lnum > 0 && lnum <= vimbuf->b_ml.ml_line_count) + { +! savebuf = curbuf; + curbuf = vimbuf; + if (u_savedel(lnum, 1) == OK) + { + ml_delete(lnum, 0); + deleted_lines_mark(lnum, 1L); +! if (savebuf == curbuf) + check_cursor(); + } +! curbuf = savebuf; + update_curbuf(VALID); + } + } +--- 1129,1159 ---- + { + if (lnum > 0 && lnum <= vimbuf->b_ml.ml_line_count) + { +! buf_T *save_curbuf = curbuf; +! #ifdef FEAT_AUTOCMD +! aco_save_T aco; +! +! /* set curwin/curbuf for "vimbuf" and save some things */ +! aucmd_prepbuf(&aco, vimbuf); +! #else + curbuf = vimbuf; ++ curwin->w_buffer = vimbuf; ++ #endif + if (u_savedel(lnum, 1) == OK) + { + ml_delete(lnum, 0); + deleted_lines_mark(lnum, 1L); +! if (save_curbuf == curbuf) + check_cursor(); + } +! #ifdef FEAT_AUTOCMD +! /* restore curwin/curbuf and a few other things */ +! aucmd_restbuf(&aco); +! /* Careful: autocommands may have made "vimbuf" invalid! */ +! #else +! curwin->w_buffer = save_curbuf; +! curbuf = save_curbuf; +! #endif + update_curbuf(VALID); + } + } +*************** +*** 1138,1144 **** + int i; + long lnum; + char *line; +- buf_T *savebuf; + PPCODE: + if (buf_valid(vimbuf)) + { +--- 1168,1173 ---- +*************** +*** 1151,1164 **** + line = SvPV(ST(i),PL_na); + if (lnum >= 0 && lnum <= vimbuf->b_ml.ml_line_count && line != NULL) + { +! savebuf = curbuf; + curbuf = vimbuf; + if (u_inssub(lnum + 1) == OK) + { + ml_append(lnum, (char_u *)line, (colnr_T)0, FALSE); + appended_lines_mark(lnum, 1L); + } +! curbuf = savebuf; + update_curbuf(VALID); + } + } +--- 1180,1210 ---- + line = SvPV(ST(i),PL_na); + if (lnum >= 0 && lnum <= vimbuf->b_ml.ml_line_count && line != NULL) + { +! #ifdef FEAT_AUTOCMD +! aco_save_T aco; +! +! /* set curwin/curbuf for "vimbuf" and save some things */ +! aucmd_prepbuf(&aco, vimbuf); +! #else +! buf_T *save_curbuf = curbuf; +! + curbuf = vimbuf; ++ curwin->w_buffer = vimbuf; ++ #endif + if (u_inssub(lnum + 1) == OK) + { + ml_append(lnum, (char_u *)line, (colnr_T)0, FALSE); + appended_lines_mark(lnum, 1L); + } +! +! #ifdef FEAT_AUTOCMD +! /* restore curwin/curbuf and a few other things */ +! aucmd_restbuf(&aco); +! /* Careful: autocommands may have made "vimbuf" invalid! */ +! #else +! curwin->w_buffer = save_curbuf; +! curbuf = save_curbuf; +! #endif + update_curbuf(VALID); + } + } +*** ../vim-7.0.043/src/version.c Tue Aug 8 16:30:51 2006 +--- src/version.c Tue Aug 8 16:45:40 2006 +*************** +*** 668,669 **** +--- 668,671 ---- + { /* Add new patch number below this line */ ++ /**/ ++ 44, + /**/ + +-- +Momento mori, ergo carpe diem + + /// Bram Moolenaar -- Bram@Moolenaar.net -- http://www.Moolenaar.net \\\ +/// sponsor Vim, vote for features -- http://www.Vim.org/sponsor/ \\\ +\\\ download, build and distribute -- http://www.A-A-P.org /// + \\\ help me help AIDS victims -- http://ICCF-Holland.org /// --- vim-7.0.orig/upstream/patches/7.0.036 +++ vim-7.0/upstream/patches/7.0.036 @@ -0,0 +1,140 @@ +To: vim-dev@vim.org +Subject: Patch 7.0.036 +Fcc: outbox +From: Bram Moolenaar +Mime-Version: 1.0 +Content-Type: text/plain; charset=ISO-8859-1 +Content-Transfer-Encoding: 8bit +------------ + +Patch 7.0.036 +Problem: Can't compile with small features and syntax highlighting or the + diff feature. +Solution: Define LINE_ATTR whenever syntax highlighting or the diff feature + is enabled. +Files: src/screen.c + + +*** ../vim-7.0.035/src/screen.c Fri May 5 23:13:04 2006 +--- src/screen.c Tue Jul 11 21:33:53 2006 +*************** +*** 2612,2618 **** + #ifdef FEAT_LINEBREAK + int need_showbreak = FALSE; + #endif +! #if defined(FEAT_SIGNS) || (defined(FEAT_QUICKFIX) && defined(FEAT_WINDOWS)) + # define LINE_ATTR + int line_attr = 0; /* atrribute for the whole line */ + #endif +--- 2612,2619 ---- + #ifdef FEAT_LINEBREAK + int need_showbreak = FALSE; + #endif +! #if defined(FEAT_SIGNS) || (defined(FEAT_QUICKFIX) && defined(FEAT_WINDOWS)) \ +! || defined(FEAT_SYN_HL) || defined(FEAT_DIFF) + # define LINE_ATTR + int line_attr = 0; /* atrribute for the whole line */ + #endif +*************** +*** 2626,2632 **** + int prev_c = 0; /* previous Arabic character */ + int prev_c1 = 0; /* first composing char for prev_c */ + #endif +! #if defined(FEAT_DIFF) || defined(LINE_ATTR) + int did_line_attr = 0; + #endif + +--- 2627,2633 ---- + int prev_c = 0; /* previous Arabic character */ + int prev_c1 = 0; /* first composing char for prev_c */ + #endif +! #if defined(LINE_ATTR) + int did_line_attr = 0; + #endif + +*************** +*** 4116,4132 **** + --ptr; /* put it back at the NUL */ + } + #endif +! #if defined(FEAT_DIFF) || defined(LINE_ATTR) + else if (( + # ifdef FEAT_DIFF +! diff_hlf != (hlf_T)0 +! # ifdef LINE_ATTR +! || +! # endif + # endif +- # ifdef LINE_ATTR + line_attr != 0 +- # endif + ) && ( + # ifdef FEAT_RIGHTLEFT + wp->w_p_rl ? (col >= 0) : +--- 4117,4128 ---- + --ptr; /* put it back at the NUL */ + } + #endif +! #if defined(LINE_ATTR) + else if (( + # ifdef FEAT_DIFF +! diff_hlf != (hlf_T)0 || + # endif + line_attr != 0 + ) && ( + # ifdef FEAT_RIGHTLEFT + wp->w_p_rl ? (col >= 0) : +*************** +*** 4237,4243 **** + * At end of the text line or just after the last character. + */ + if (c == NUL +! #if defined(FEAT_DIFF) || defined(LINE_ATTR) + || did_line_attr == 1 + #endif + ) +--- 4233,4239 ---- + * At end of the text line or just after the last character. + */ + if (c == NUL +! #if defined(LINE_ATTR) + || did_line_attr == 1 + #endif + ) +*************** +*** 4258,4264 **** + || prevcol == (long)match_hl[0].startcol + || prevcol == (long)match_hl[1].startcol + || prevcol == (long)match_hl[2].startcol) +! # if defined(FEAT_DIFF) || defined(LINE_ATTR) + && did_line_attr <= 1 + # endif + ) +--- 4254,4260 ---- + || prevcol == (long)match_hl[0].startcol + || prevcol == (long)match_hl[1].startcol + || prevcol == (long)match_hl[2].startcol) +! # if defined(LINE_ATTR) + && did_line_attr <= 1 + # endif + ) +*** ../vim-7.0.035/src/version.c Fri Jun 23 21:36:49 2006 +--- src/version.c Tue Jul 11 21:36:50 2006 +*************** +*** 668,669 **** +--- 668,671 ---- + { /* Add new patch number below this line */ ++ /**/ ++ 36, + /**/ + +-- +Every engineer dreams about saving the universe and having sex with aliens. +This is much more glamorous than the real life of an engineer, which consists +of hiding from the universe and having sex without the participation of other +life forms. (Scott Adams - The Dilbert principle) + + /// Bram Moolenaar -- Bram@Moolenaar.net -- http://www.Moolenaar.net \\\ +/// sponsor Vim, vote for features -- http://www.Vim.org/sponsor/ \\\ +\\\ download, build and distribute -- http://www.A-A-P.org /// + \\\ help me help AIDS victims -- http://ICCF-Holland.org /// --- vim-7.0.orig/upstream/patches/7.0.029 +++ vim-7.0/upstream/patches/7.0.029 @@ -0,0 +1,48 @@ +To: vim-dev@vim.org +Subject: Patch 7.0.029 +Fcc: outbox +From: Bram Moolenaar +Mime-Version: 1.0 +Content-Type: text/plain; charset=ISO-8859-1 +Content-Transfer-Encoding: 8bit +------------ + +Patch 7.0.029 +Problem: getchar() may not position the cursor after a space. +Solution: Position the cursor explicitly. +Files: src/eval.c + + +*** ../vim-7.0.028/src/eval.c Thu Jun 22 18:02:06 2006 +--- src/eval.c Thu Jun 22 21:00:00 2006 +*************** +*** 9792,9797 **** +--- 9792,9800 ---- + varnumber_T n; + int error = FALSE; + ++ /* Position the cursor. Needed after a message that ends in a space. */ ++ windgoto(msg_row, msg_col); ++ + ++no_mapping; + ++allow_keys; + if (argvars[0].v_type == VAR_UNKNOWN) +*** ../vim-7.0.028/src/version.c Thu Jun 22 19:47:11 2006 +--- src/version.c Thu Jun 22 20:55:43 2006 +*************** +*** 668,669 **** +--- 668,671 ---- + { /* Add new patch number below this line */ ++ /**/ ++ 29, + /**/ + +-- +BEDEVERE: How do you know so much about swallows? +ARTHUR: Well you have to know these things when you're a king, you know. + "Monty Python and the Holy Grail" PYTHON (MONTY) PICTURES LTD + + /// Bram Moolenaar -- Bram@Moolenaar.net -- http://www.Moolenaar.net \\\ +/// sponsor Vim, vote for features -- http://www.Vim.org/sponsor/ \\\ +\\\ download, build and distribute -- http://www.A-A-P.org /// + \\\ help me help AIDS victims -- http://ICCF-Holland.org /// --- vim-7.0.orig/upstream/patches/7.0.132 +++ vim-7.0/upstream/patches/7.0.132 @@ -0,0 +1,78 @@ +To: vim-dev@vim.org +Subject: Patch 7.0.132 +Fcc: outbox +From: Bram Moolenaar +Mime-Version: 1.0 +Content-Type: text/plain; charset=ISO-8859-1 +Content-Transfer-Encoding: 8bit +------------ + +Patch 7.0.132 (after 7.0.130) +Problem: Win32: Crash when Vim reads from stdin. +Solution: Only use mch_nodetype() when there is a file name. +Files: src/fileio.c + + +*** ../vim-7.0.131/src/fileio.c Tue Oct 10 18:43:50 2006 +--- src/fileio.c Thu Oct 12 20:50:35 2006 +*************** +*** 416,435 **** + msg_scroll = msg_save; + return FAIL; + } +- } +- #endif + +! #if defined(MSDOS) || defined(MSWIN) || defined(OS2) +! /* +! * MS-Windows allows opening a device, but we will probably get stuck +! * trying to read it. +! */ +! if (!p_odev && mch_nodetype(fname) == NODE_WRITABLE) +! { +! filemess(curbuf, fname, (char_u *)_("is a device (disabled with 'opendevice' option"), 0); +! msg_end(); +! msg_scroll = msg_save; +! return FAIL; + } + #endif + +--- 416,435 ---- + msg_scroll = msg_save; + return FAIL; + } + +! # if defined(MSDOS) || defined(MSWIN) || defined(OS2) +! /* +! * MS-Windows allows opening a device, but we will probably get stuck +! * trying to read it. +! */ +! if (!p_odev && mch_nodetype(fname) == NODE_WRITABLE) +! { +! filemess(curbuf, fname, (char_u *)_("is a device (disabled with 'opendevice' option"), 0); +! msg_end(); +! msg_scroll = msg_save; +! return FAIL; +! } +! # endif + } + #endif + +*** ../vim-7.0.131/src/version.c Tue Oct 10 21:56:37 2006 +--- src/version.c Thu Oct 12 21:13:34 2006 +*************** +*** 668,669 **** +--- 668,671 ---- + { /* Add new patch number below this line */ ++ /**/ ++ 132, + /**/ + +-- +hundred-and-one symptoms of being an internet addict: +31. You code your homework in HTML and give your instructor the URL. + + /// Bram Moolenaar -- Bram@Moolenaar.net -- http://www.Moolenaar.net \\\ +/// sponsor Vim, vote for features -- http://www.Vim.org/sponsor/ \\\ +\\\ download, build and distribute -- http://www.A-A-P.org /// + \\\ help me help AIDS victims -- http://ICCF-Holland.org /// --- vim-7.0.orig/upstream/patches/7.0.020 +++ vim-7.0/upstream/patches/7.0.020 @@ -0,0 +1,52 @@ +To: vim-dev@vim.org +Subject: Patch 7.0.020 +Fcc: outbox +From: Bram Moolenaar +Mime-Version: 1.0 +Content-Type: text/plain; charset=ISO-8859-1 +Content-Transfer-Encoding: 8bit +------------ + +Patch 7.0.020 +Problem: Crash when using 'mousefocus'. (William Fulton) +Solution: Make buffer for mouse coordinates 2 bytes longer. (Juergen Weigert) +Files: src/gui.c + + +*** ../vim-7.0.019/src/gui.c Sat May 13 12:15:09 2006 +--- src/gui.c Tue Jun 20 16:27:02 2006 +*************** +*** 4515,4521 **** + int y; + { + win_T *wp; +! char_u st[6]; + + /* Ignore this while still starting up. */ + if (!gui.in_use || gui.starting) +--- 4515,4521 ---- + int y; + { + win_T *wp; +! char_u st[8]; + + /* Ignore this while still starting up. */ + if (!gui.in_use || gui.starting) +*** ../vim-7.0.019/src/version.c Tue Jun 20 12:56:11 2006 +--- src/version.c Tue Jun 20 16:32:28 2006 +*************** +*** 668,669 **** +--- 668,671 ---- + { /* Add new patch number below this line */ ++ /**/ ++ 20, + /**/ + +-- +Michael: There is no such thing as a dump question. +Bernard: Sure there is. For example "what is a core dump?" + + /// Bram Moolenaar -- Bram@Moolenaar.net -- http://www.Moolenaar.net \\\ +/// sponsor Vim, vote for features -- http://www.Vim.org/sponsor/ \\\ +\\\ download, build and distribute -- http://www.A-A-P.org /// + \\\ help me help AIDS victims -- http://ICCF-Holland.org /// --- vim-7.0.orig/upstream/patches/7.0.161 +++ vim-7.0/upstream/patches/7.0.161 @@ -0,0 +1,244 @@ +To: vim-dev@vim.org +Subject: Patch 7.0.161 +Fcc: outbox +From: Bram Moolenaar +Mime-Version: 1.0 +Content-Type: text/plain; charset=ISO-8859-1 +Content-Transfer-Encoding: 8bit +------------ + +Patch 7.0.161 +Problem: Win32: Tab pages line popup menu isn't using the right encoding. + (Yongwei Wu) +Solution: Convert the text when necessary. Also fixes the Find/Replace + dialog title. (Yegappan Lakshmanan) +Files: src/gui_w48.c + + +*** ../vim-7.0.160/src/gui_w48.c Tue Aug 29 21:30:15 2006 +--- src/gui_w48.c Tue Nov 7 19:03:52 2006 +*************** +*** 2217,2226 **** + + #if defined(FEAT_GUI_TABLINE) || defined(PROTO) + static void + show_tabline_popup_menu(void) + { + HMENU tab_pmenu; +- MENUITEMINFO minfo; + long rval; + POINT pt; + +--- 2217,2270 ---- + + #if defined(FEAT_GUI_TABLINE) || defined(PROTO) + static void ++ add_tabline_popup_menu_entry(HMENU pmenu, UINT item_id, char_u *item_text) ++ { ++ #ifdef FEAT_MBYTE ++ WCHAR *wn = NULL; ++ int n; ++ ++ if (enc_codepage >= 0 && (int)GetACP() != enc_codepage) ++ { ++ /* 'encoding' differs from active codepage: convert menu name ++ * and use wide function */ ++ wn = enc_to_ucs2(item_text, NULL); ++ if (wn != NULL) ++ { ++ MENUITEMINFOW infow; ++ ++ infow.cbSize = sizeof(infow); ++ infow.fMask = MIIM_TYPE | MIIM_ID; ++ infow.wID = item_id; ++ infow.fType = MFT_STRING; ++ infow.dwTypeData = wn; ++ infow.cch = (UINT)wcslen(wn); ++ n = InsertMenuItemW(pmenu, item_id, FALSE, &infow); ++ vim_free(wn); ++ if (n == 0 && GetLastError() == ERROR_CALL_NOT_IMPLEMENTED) ++ /* Failed, try using non-wide function. */ ++ wn = NULL; ++ } ++ } ++ ++ if (wn == NULL) ++ #endif ++ { ++ MENUITEMINFO info; ++ ++ info.cbSize = sizeof(info); ++ info.fMask = MIIM_TYPE | MIIM_ID; ++ info.wID = item_id; ++ info.fType = MFT_STRING; ++ info.dwTypeData = item_text; ++ info.cch = (UINT)STRLEN(item_text); ++ InsertMenuItem(pmenu, item_id, FALSE, &info); ++ } ++ } ++ ++ static void + show_tabline_popup_menu(void) + { + HMENU tab_pmenu; + long rval; + POINT pt; + +*************** +*** 2236,2256 **** + if (tab_pmenu == NULL) + return; + +! minfo.cbSize = sizeof(MENUITEMINFO); +! minfo.fMask = MIIM_TYPE|MIIM_ID; +! minfo.fType = MFT_STRING; +! +! minfo.dwTypeData = _("Close tab"); +! minfo.wID = TABLINE_MENU_CLOSE; +! InsertMenuItem(tab_pmenu, TABLINE_MENU_CLOSE, FALSE, &minfo); +! +! minfo.dwTypeData = _("New tab"); +! minfo.wID = TABLINE_MENU_NEW; +! InsertMenuItem(tab_pmenu, TABLINE_MENU_NEW, FALSE, &minfo); +! +! minfo.dwTypeData = _("Open tab..."); +! minfo.wID = TABLINE_MENU_OPEN; +! InsertMenuItem(tab_pmenu, TABLINE_MENU_OPEN, FALSE, &minfo); + + GetCursorPos(&pt); + rval = TrackPopupMenuEx(tab_pmenu, TPM_RETURNCMD, pt.x, pt.y, s_tabhwnd, +--- 2280,2289 ---- + if (tab_pmenu == NULL) + return; + +! add_tabline_popup_menu_entry(tab_pmenu, TABLINE_MENU_CLOSE, _("Close tab")); +! add_tabline_popup_menu_entry(tab_pmenu, TABLINE_MENU_NEW, _("New tab")); +! add_tabline_popup_menu_entry(tab_pmenu, TABLINE_MENU_OPEN, +! _("Open tab...")); + + GetCursorPos(&pt); + rval = TrackPopupMenuEx(tab_pmenu, TPM_RETURNCMD, pt.x, pt.y, s_tabhwnd, +*************** +*** 2455,2460 **** +--- 2488,2517 ---- + } + #endif + ++ static void ++ set_window_title(HWND hwnd, char *title) ++ { ++ #ifdef FEAT_MBYTE ++ if (title != NULL && enc_codepage >= 0 && enc_codepage != (int)GetACP()) ++ { ++ WCHAR *wbuf; ++ int n; ++ ++ /* Convert the title from 'encoding' to ucs2. */ ++ wbuf = (WCHAR *)enc_to_ucs2((char_u *)title, NULL); ++ if (wbuf != NULL) ++ { ++ n = SetWindowTextW(hwnd, wbuf); ++ vim_free(wbuf); ++ if (n != 0 || GetLastError() != ERROR_CALL_NOT_IMPLEMENTED) ++ return; ++ /* Retry with non-wide function (for Windows 98). */ ++ } ++ } ++ #endif ++ (void)SetWindowText(hwnd, (LPCSTR)title); ++ } ++ + void + gui_mch_find_dialog(exarg_T *eap) + { +*************** +*** 2470,2477 **** + s_findrep_hwnd = FindText((LPFINDREPLACE) &s_findrep_struct); + } + +! (void)SetWindowText(s_findrep_hwnd, +! (LPCSTR)_("Find string (use '\\\\' to find a '\\')")); + (void)SetFocus(s_findrep_hwnd); + + s_findrep_is_find = TRUE; +--- 2527,2534 ---- + s_findrep_hwnd = FindText((LPFINDREPLACE) &s_findrep_struct); + } + +! set_window_title(s_findrep_hwnd, +! _("Find string (use '\\\\' to find a '\\')")); + (void)SetFocus(s_findrep_hwnd); + + s_findrep_is_find = TRUE; +*************** +*** 2495,2502 **** + s_findrep_hwnd = ReplaceText((LPFINDREPLACE) &s_findrep_struct); + } + +! (void)SetWindowText(s_findrep_hwnd, +! (LPCSTR)_("Find & Replace (use '\\\\' to find a '\\')")); + (void)SetFocus(s_findrep_hwnd); + + s_findrep_is_find = FALSE; +--- 2552,2559 ---- + s_findrep_hwnd = ReplaceText((LPFINDREPLACE) &s_findrep_struct); + } + +! set_window_title(s_findrep_hwnd, +! _("Find & Replace (use '\\\\' to find a '\\')")); + (void)SetFocus(s_findrep_hwnd); + + s_findrep_is_find = FALSE; +*************** +*** 3015,3039 **** + char_u *title, + char_u *icon) + { +! #ifdef FEAT_MBYTE +! if (title != NULL && enc_codepage >= 0 && enc_codepage != (int)GetACP()) +! { +! WCHAR *wbuf; +! int n; +! +! /* Convert the title from 'encoding' to ucs2. */ +! wbuf = (WCHAR *)enc_to_ucs2(title, NULL); +! if (wbuf != NULL) +! { +! n = SetWindowTextW(s_hwnd, wbuf); +! vim_free(wbuf); +! if (n != 0 || GetLastError() != ERROR_CALL_NOT_IMPLEMENTED) +! return; +! /* Retry with non-wide function (for Windows 98). */ +! } +! } +! #endif +! SetWindowText(s_hwnd, (LPCSTR)(title == NULL ? "VIM" : (char *)title)); + } + + #ifdef FEAT_MOUSESHAPE +--- 3072,3078 ---- + char_u *title, + char_u *icon) + { +! set_window_title(s_hwnd, (title == NULL ? "VIM" : (char *)title)); + } + + #ifdef FEAT_MOUSESHAPE +*** ../vim-7.0.160/src/version.c Tue Nov 7 18:43:10 2006 +--- src/version.c Tue Nov 7 18:57:42 2006 +*************** +*** 668,669 **** +--- 668,671 ---- + { /* Add new patch number below this line */ ++ /**/ ++ 161, + /**/ + +-- +hundred-and-one symptoms of being an internet addict: +174. You know what a listserv is. + + /// Bram Moolenaar -- Bram@Moolenaar.net -- http://www.Moolenaar.net \\\ +/// sponsor Vim, vote for features -- http://www.Vim.org/sponsor/ \\\ +\\\ download, build and distribute -- http://www.A-A-P.org /// + \\\ help me help AIDS victims -- http://ICCF-Holland.org /// --- vim-7.0.orig/upstream/patches/7.0.004 +++ vim-7.0/upstream/patches/7.0.004 @@ -0,0 +1,52 @@ +To: vim-dev@vim.org +Subject: Patch 7.0.004 +Fcc: outbox +From: Bram Moolenaar +Mime-Version: 1.0 +Content-Type: text/plain; charset=ISO-8859-1 +Content-Transfer-Encoding: 8bit +------------ + +Patch 7.0.004 +Problem: Compiler warning for debug_saved used before set. (Todd Blumer) +Solution: Remove the "else" for calling save_dbg_stuff(). +Files: src/ex_docmd.c + + +*** ../vim-7.0.003/src/ex_docmd.c Wed May 10 15:22:49 2006 +--- src/ex_docmd.c Mon May 8 16:43:34 2006 +*************** +*** 833,839 **** + * If requested, store and reset the global values controlling the + * exception handling (used when debugging). + */ +! else if (flags & DOCMD_EXCRESET) + save_dbg_stuff(&debug_saved); + + initial_trylevel = trylevel; +--- 833,839 ---- + * If requested, store and reset the global values controlling the + * exception handling (used when debugging). + */ +! if (flags & DOCMD_EXCRESET) + save_dbg_stuff(&debug_saved); + + initial_trylevel = trylevel; +*** ../vim-7.0.003/src/version.c Wed May 10 17:12:51 2006 +--- src/version.c Wed May 10 17:14:34 2006 +*************** +*** 668,669 **** +--- 668,671 ---- + { /* Add new patch number below this line */ ++ /**/ ++ 4, + /**/ + +-- +From "know your smileys": + :-D Big smile + + /// Bram Moolenaar -- Bram@Moolenaar.net -- http://www.Moolenaar.net \\\ +/// sponsor Vim, vote for features -- http://www.Vim.org/sponsor/ \\\ +\\\ download, build and distribute -- http://www.A-A-P.org /// + \\\ help me help AIDS victims -- http://ICCF-Holland.org /// --- vim-7.0.orig/upstream/patches/7.0.085 +++ vim-7.0/upstream/patches/7.0.085 @@ -0,0 +1,53 @@ +To: vim-dev@vim.org +Subject: Patch 7.0.085 +Fcc: outbox +From: Bram Moolenaar +Mime-Version: 1.0 +Content-Type: text/plain; charset=ISO-8859-1 +Content-Transfer-Encoding: 8bit +------------ + +Patch 7.0.085 +Problem: When doing "make test" the viminfo file is modified. +Solution: Use another viminfo file after setting 'compatible. +Files: src/testdir/test56.in + + +*** ../vim-7.0.084/src/testdir/test56.in Thu May 19 00:21:20 2005 +--- src/testdir/test56.in Sun Sep 3 16:28:41 2006 +*************** +*** 3,9 **** + STARTTEST + :so small.vim + :" +! :set nocp + :/^start:/+1,/^end:/-1w! Xtest.vim + :source Xtest.vim + _x +--- 3,9 ---- + STARTTEST + :so small.vim + :" +! :set nocp viminfo+=nviminfo + :/^start:/+1,/^end:/-1w! Xtest.vim + :source Xtest.vim + _x +*** ../vim-7.0.084/src/version.c Tue Sep 5 12:57:14 2006 +--- src/version.c Tue Sep 5 13:33:22 2006 +*************** +*** 668,669 **** +--- 668,671 ---- + { /* Add new patch number below this line */ ++ /**/ ++ 85, + /**/ + +-- +Apologies for taking up the bandwidth with the apology. Anything else I +can apologise for ...... er no can't think of anything, sorry about that. + Andy Hunt (Member of British Olympic Apology Squad) + + /// Bram Moolenaar -- Bram@Moolenaar.net -- http://www.Moolenaar.net \\\ +/// sponsor Vim, vote for features -- http://www.Vim.org/sponsor/ \\\ +\\\ download, build and distribute -- http://www.A-A-P.org /// + \\\ help me help AIDS victims -- http://ICCF-Holland.org /// --- vim-7.0.orig/upstream/patches/7.0.151 +++ vim-7.0/upstream/patches/7.0.151 @@ -0,0 +1,55 @@ +To: vim-dev@vim.org +Subject: Patch 7.0.151 +Fcc: outbox +From: Bram Moolenaar +Mime-Version: 1.0 +Content-Type: text/plain; charset=ISO-8859-1 +Content-Transfer-Encoding: 8bit +------------ + +Patch 7.0.151 +Problem: Buttons in file dialog are not according to Gnome guidelines. +Solution: Swap Cancel and Open buttons. (Stefano Zacchiroli) +Files: src/gui_gtk.c + + +*** ../vim-7.0.150/src/gui_gtk.c Tue Oct 10 18:29:21 2006 +--- src/gui_gtk.c Sun Oct 22 15:33:40 2006 +*************** +*** 1293,1300 **** + GTK_WINDOW(gui.mainwin), + saving ? GTK_FILE_CHOOSER_ACTION_SAVE + : GTK_FILE_CHOOSER_ACTION_OPEN, +- saving ? GTK_STOCK_SAVE : GTK_STOCK_OPEN, GTK_RESPONSE_ACCEPT, + GTK_STOCK_CANCEL, GTK_RESPONSE_CANCEL, + NULL); + gtk_file_chooser_set_current_folder(GTK_FILE_CHOOSER(fc), + (const gchar *)dirbuf); +--- 1293,1300 ---- + GTK_WINDOW(gui.mainwin), + saving ? GTK_FILE_CHOOSER_ACTION_SAVE + : GTK_FILE_CHOOSER_ACTION_OPEN, + GTK_STOCK_CANCEL, GTK_RESPONSE_CANCEL, ++ saving ? GTK_STOCK_SAVE : GTK_STOCK_OPEN, GTK_RESPONSE_ACCEPT, + NULL); + gtk_file_chooser_set_current_folder(GTK_FILE_CHOOSER(fc), + (const gchar *)dirbuf); +*** ../vim-7.0.150/src/version.c Tue Oct 24 21:38:16 2006 +--- src/version.c Tue Oct 24 22:01:07 2006 +*************** +*** 668,669 **** +--- 668,671 ---- + { /* Add new patch number below this line */ ++ /**/ ++ 151, + /**/ + +-- +hundred-and-one symptoms of being an internet addict: +108. While reading a magazine, you look for the Zoom icon for a better + look at a photograph. + + /// Bram Moolenaar -- Bram@Moolenaar.net -- http://www.Moolenaar.net \\\ +/// sponsor Vim, vote for features -- http://www.Vim.org/sponsor/ \\\ +\\\ download, build and distribute -- http://www.A-A-P.org /// + \\\ help me help AIDS victims -- http://ICCF-Holland.org /// --- vim-7.0.orig/upstream/patches/7.0.119 +++ vim-7.0/upstream/patches/7.0.119 @@ -0,0 +1,48 @@ +To: vim-dev@vim.org +Subject: Patch 7.0.119 +Fcc: outbox +From: Bram Moolenaar +Mime-Version: 1.0 +Content-Type: text/plain; charset=ISO-8859-1 +Content-Transfer-Encoding: 8bit +------------ + +Patch 7.0.119 +Problem: When going back from Insert to Normal mode the CursorHold event + doesn't trigger. (Yakov Lerner) +Solution: Reset "did_cursorhold" when leaving Insert mode. +Files: src/edit.c + + +*** ../vim-7.0.118/src/edit.c Tue Oct 3 15:49:20 2006 +--- src/edit.c Thu Oct 5 22:26:27 2006 +*************** +*** 923,928 **** +--- 923,929 ---- + if (cmdchar != 'r' && cmdchar != 'v') + apply_autocmds(EVENT_INSERTLEAVE, NULL, NULL, + FALSE, curbuf); ++ did_cursorhold = FALSE; + #endif + return (c == Ctrl_O); + } +*** ../vim-7.0.118/src/version.c Tue Oct 3 17:21:04 2006 +--- src/version.c Fri Oct 6 20:35:45 2006 +*************** +*** 668,669 **** +--- 668,671 ---- + { /* Add new patch number below this line */ ++ /**/ ++ 119, + /**/ + +-- +The Feynman problem solving Algorithm: + 1) Write down the problem + 2) Think real hard + 3) Write down the answer + + /// Bram Moolenaar -- Bram@Moolenaar.net -- http://www.Moolenaar.net \\\ +/// sponsor Vim, vote for features -- http://www.Vim.org/sponsor/ \\\ +\\\ download, build and distribute -- http://www.A-A-P.org /// + \\\ help me help AIDS victims -- http://ICCF-Holland.org /// --- vim-7.0.orig/upstream/patches/7.0.078 +++ vim-7.0/upstream/patches/7.0.078 @@ -0,0 +1,52 @@ +To: vim-dev@vim.org +Subject: Patch 7.0.078 +Fcc: outbox +From: Bram Moolenaar +Mime-Version: 1.0 +Content-Type: text/plain; charset=ISO-8859-1 +Content-Transfer-Encoding: 8bit +------------ + +Patch 7.0.078 +Problem: There are two error messages E46. +Solution: Change the number for the sandbox message to E794. +Files: src/globals.h + + +*** ../vim-7.0.077/src/globals.h Sun Apr 30 20:32:38 2006 +--- src/globals.h Sat Sep 2 13:12:55 2006 +*************** +*** 1441,1447 **** + EXTERN char_u e_readonly[] INIT(= N_("E45: 'readonly' option is set (add ! to override)")); + #ifdef FEAT_EVAL + EXTERN char_u e_readonlyvar[] INIT(= N_("E46: Cannot change read-only variable \"%s\"")); +! EXTERN char_u e_readonlysbx[] INIT(= N_("E46: Cannot set variable in the sandbox: \"%s\"")); + #endif + #ifdef FEAT_QUICKFIX + EXTERN char_u e_readerrf[] INIT(= N_("E47: Error while reading errorfile")); +--- 1441,1447 ---- + EXTERN char_u e_readonly[] INIT(= N_("E45: 'readonly' option is set (add ! to override)")); + #ifdef FEAT_EVAL + EXTERN char_u e_readonlyvar[] INIT(= N_("E46: Cannot change read-only variable \"%s\"")); +! EXTERN char_u e_readonlysbx[] INIT(= N_("E794: Cannot set variable in the sandbox: \"%s\"")); + #endif + #ifdef FEAT_QUICKFIX + EXTERN char_u e_readerrf[] INIT(= N_("E47: Error while reading errorfile")); +*** ../vim-7.0.077/src/version.c Sat Sep 2 13:45:01 2006 +--- src/version.c Sat Sep 2 14:08:12 2006 +*************** +*** 668,669 **** +--- 668,671 ---- + { /* Add new patch number below this line */ ++ /**/ ++ 78, + /**/ + +-- +"Intelligence has much less practical application than you'd think." + -- Scott Adams, Dilbert. + + /// Bram Moolenaar -- Bram@Moolenaar.net -- http://www.Moolenaar.net \\\ +/// sponsor Vim, vote for features -- http://www.Vim.org/sponsor/ \\\ +\\\ download, build and distribute -- http://www.A-A-P.org /// + \\\ help me help AIDS victims -- http://ICCF-Holland.org /// --- vim-7.0.orig/upstream/patches/7.0.163 +++ vim-7.0/upstream/patches/7.0.163 @@ -0,0 +1,133 @@ +To: vim-dev@vim.org +Subject: Patch 7.0.163 +Fcc: outbox +From: Bram Moolenaar +Mime-Version: 1.0 +Content-Type: text/plain; charset=ISO-8859-1 +Content-Transfer-Encoding: 8bit +------------ + +Patch 7.0.163 +Problem: Can't retrieve the position of a sign after it was set. +Solution: Add the netbeans interface getAnno command. (Xavier de Gaye) +Files: runtime/doc/netbeans.txt, src/netbeans.c + + +*** ../vim-7.0.162/runtime/doc/netbeans.txt Sun May 7 16:58:43 2006 +--- runtime/doc/netbeans.txt Tue Nov 14 18:24:32 2006 +*************** +*** 1,4 **** +! *netbeans.txt* For Vim version 7.0. Last change: 2006 Mar 09 + + + VIM REFERENCE MANUAL by Gordon Prieur +--- 1,4 ---- +! *netbeans.txt* For Vim version 7.0. Last change: 2006 Nov 14 + + + VIM REFERENCE MANUAL by Gordon Prieur +*************** +*** 259,266 **** + confusion happening again, netbeans_saved() has been renamed to + netbeans_save_buffer(). + +! We are now at version 2.3. For the differences between 2.2 and 2.3 search for +! "2.3" below. + + The messages are currently sent over a socket. Since the messages are in + plain UTF-8 text this protocol could also be used with any other communication +--- 259,266 ---- + confusion happening again, netbeans_saved() has been renamed to + netbeans_save_buffer(). + +! We are now at version 2.4. For the differences between 2.3 and 2.4 search for +! "2.4" below. + + The messages are currently sent over a socket. Since the messages are in + plain UTF-8 text this protocol could also be used with any other communication +*************** +*** 604,609 **** +--- 604,618 ---- + TODO: explain use of partial line. + + getMark Not implemented. ++ ++ getAnno serNum ++ Return the line number of the annotation in the buffer. ++ Argument: ++ serNum serial number of this placed annotation ++ The reply is: ++ 123 lnum line number of the annotation ++ 123 0 invalid annotation serial number ++ New in version 2.4. + + getModified When a buffer is specified: Return zero if the buffer does not + have changes, one if it does have changes. +*** ../vim-7.0.162/src/netbeans.c Tue Aug 29 17:28:56 2006 +--- src/netbeans.c Tue Nov 14 18:23:48 2006 +*************** +*** 61,67 **** + + /* The first implementation (working only with Netbeans) returned "1.1". The + * protocol implemented here also supports A-A-P. */ +! static char *ExtEdProtocolVersion = "2.3"; + + static long pos2off __ARGS((buf_T *, pos_T *)); + static pos_T *off2pos __ARGS((buf_T *, long)); +--- 61,67 ---- + + /* The first implementation (working only with Netbeans) returned "1.1". The + * protocol implemented here also supports A-A-P. */ +! static char *ExtEdProtocolVersion = "2.4"; + + static long pos2off __ARGS((buf_T *, pos_T *)); + static pos_T *off2pos __ARGS((buf_T *, long)); +*************** +*** 1269,1274 **** +--- 1269,1297 ---- + (int)curwin->w_cursor.col, + pos2off(curbuf, &curwin->w_cursor)); + nb_reply_text(cmdno, text); ++ /* =====================================================================*/ ++ } ++ else if (streq((char *)cmd, "getAnno")) ++ { ++ long linenum = 0; ++ #ifdef FEAT_SIGNS ++ if (buf == NULL || buf->bufp == NULL) ++ { ++ nbdebug((" null bufp in getAnno")); ++ EMSG("E652: null bufp in getAnno"); ++ retval = FAIL; ++ } ++ else ++ { ++ int serNum; ++ ++ cp = (char *)args; ++ serNum = strtol(cp, &cp, 10); ++ /* If the sign isn't found linenum will be zero. */ ++ linenum = (long)buf_findsign(buf->bufp, serNum); ++ } ++ #endif ++ nb_reply_nr(cmdno, linenum); + /* =====================================================================*/ + } + else if (streq((char *)cmd, "getLength")) +*** ../vim-7.0.162/src/version.c Tue Nov 7 22:41:37 2006 +--- src/version.c Tue Nov 14 18:25:31 2006 +*************** +*** 668,669 **** +--- 668,671 ---- + { /* Add new patch number below this line */ ++ /**/ ++ 163, + /**/ + +-- +A computer without Windows is like a fish without a bicycle. + + /// Bram Moolenaar -- Bram@Moolenaar.net -- http://www.Moolenaar.net \\\ +/// sponsor Vim, vote for features -- http://www.Vim.org/sponsor/ \\\ +\\\ download, build and distribute -- http://www.A-A-P.org /// + \\\ help me help AIDS victims -- http://ICCF-Holland.org /// --- vim-7.0.orig/upstream/patches/7.0.068 +++ vim-7.0/upstream/patches/7.0.068 @@ -0,0 +1,194 @@ +To: vim-dev@vim.org +Subject: Patch 7.0.068 +Fcc: outbox +From: Bram Moolenaar +Mime-Version: 1.0 +Content-Type: text/plain; charset=ISO-8859-1 +Content-Transfer-Encoding: 8bit +------------ + +Patch 7.0.068 +Problem: When 'ignorecase' is set and using Insert mode completion, + typing characters to change the list of matches, case is not + ignored. (Hugo Ahlenius) +Solution: Store the 'ignorecase' flag with the matches where needed. +Files: src/edit.c, src/search.c, src/spell.c + + +*** ../vim-7.0.067/src/edit.c Tue Aug 29 16:10:54 2006 +--- src/edit.c Tue Aug 29 14:57:46 2006 +*************** +*** 2405,2411 **** + /* compl_pattern doesn't need to be set */ + compl_orig_text = vim_strnsave(ml_get_curline() + compl_col, compl_length); + if (compl_orig_text == NULL || ins_compl_add(compl_orig_text, +! -1, FALSE, NULL, NULL, 0, ORIGINAL_TEXT, FALSE) != OK) + return; + + /* Handle like dictionary completion. */ +--- 2405,2411 ---- + /* compl_pattern doesn't need to be set */ + compl_orig_text = vim_strnsave(ml_get_curline() + compl_col, compl_length); + if (compl_orig_text == NULL || ins_compl_add(compl_orig_text, +! -1, p_ic, NULL, NULL, 0, ORIGINAL_TEXT, FALSE) != OK) + return; + + /* Handle like dictionary completion. */ +*************** +*** 2821,2827 **** + ptr = find_word_end(ptr); + add_r = ins_compl_add_infercase(regmatch->startp[0], + (int)(ptr - regmatch->startp[0]), +! FALSE, files[i], *dir, 0); + if (thesaurus) + { + char_u *wstart; +--- 2821,2827 ---- + ptr = find_word_end(ptr); + add_r = ins_compl_add_infercase(regmatch->startp[0], + (int)(ptr - regmatch->startp[0]), +! p_ic, files[i], *dir, 0); + if (thesaurus) + { + char_u *wstart; +*************** +*** 2857,2863 **** + ptr = find_word_end(ptr); + add_r = ins_compl_add_infercase(wstart, + (int)(ptr - wstart), +! FALSE, files[i], *dir, 0); + } + } + if (add_r == OK) +--- 2857,2863 ---- + ptr = find_word_end(ptr); + add_r = ins_compl_add_infercase(wstart, + (int)(ptr - wstart), +! p_ic, files[i], *dir, 0); + } + } + if (add_r == OK) +*************** +*** 3826,3832 **** + TAG_INS_COMP | (ctrl_x_mode ? TAG_VERBOSE : 0), + TAG_MANY, curbuf->b_ffname) == OK && num_matches > 0) + { +! ins_compl_add_matches(num_matches, matches, FALSE); + } + p_ic = save_p_ic; + break; +--- 3826,3832 ---- + TAG_INS_COMP | (ctrl_x_mode ? TAG_VERBOSE : 0), + TAG_MANY, curbuf->b_ffname) == OK && num_matches > 0) + { +! ins_compl_add_matches(num_matches, matches, p_ic); + } + p_ic = save_p_ic; + break; +*************** +*** 3867,3873 **** + num_matches = expand_spelling(first_match_pos.lnum, + first_match_pos.col, compl_pattern, &matches); + if (num_matches > 0) +! ins_compl_add_matches(num_matches, matches, FALSE); + #endif + break; + +--- 3867,3873 ---- + num_matches = expand_spelling(first_match_pos.lnum, + first_match_pos.col, compl_pattern, &matches); + if (num_matches > 0) +! ins_compl_add_matches(num_matches, matches, p_ic); + #endif + break; + +*************** +*** 4001,4007 **** + continue; + } + } +! if (ins_compl_add_infercase(ptr, len, FALSE, + ins_buf == curbuf ? NULL : ins_buf->b_sfname, + 0, flags) != NOTDONE) + { +--- 4001,4007 ---- + continue; + } + } +! if (ins_compl_add_infercase(ptr, len, p_ic, + ins_buf == curbuf ? NULL : ins_buf->b_sfname, + 0, flags) != NOTDONE) + { +*************** +*** 4809,4815 **** + vim_free(compl_orig_text); + compl_orig_text = vim_strnsave(line + compl_col, compl_length); + if (compl_orig_text == NULL || ins_compl_add(compl_orig_text, +! -1, FALSE, NULL, NULL, 0, ORIGINAL_TEXT, FALSE) != OK) + { + vim_free(compl_pattern); + compl_pattern = NULL; +--- 4809,4815 ---- + vim_free(compl_orig_text); + compl_orig_text = vim_strnsave(line + compl_col, compl_length); + if (compl_orig_text == NULL || ins_compl_add(compl_orig_text, +! -1, p_ic, NULL, NULL, 0, ORIGINAL_TEXT, FALSE) != OK) + { + vim_free(compl_pattern); + compl_pattern = NULL; +*** ../vim-7.0.067/src/search.c Fri May 5 23:15:17 2006 +--- src/search.c Tue Aug 29 14:56:15 2006 +*************** +*** 4871,4877 **** + goto exit_matched; + } + +! add_r = ins_compl_add_infercase(aux, i, FALSE, + curr_fname == curbuf->b_fname ? NULL : curr_fname, + dir, reuse); + if (add_r == OK) +--- 4876,4882 ---- + goto exit_matched; + } + +! add_r = ins_compl_add_infercase(aux, i, p_ic, + curr_fname == curbuf->b_fname ? NULL : curr_fname, + dir, reuse); + if (add_r == OK) +*** ../vim-7.0.067/src/spell.c Sun Jul 23 21:52:16 2006 +--- src/spell.c Tue Aug 29 14:56:26 2006 +*************** +*** 15658,15664 **** + ? MB_STRNICMP(p, pat, STRLEN(pat)) == 0 + : STRNCMP(p, pat, STRLEN(pat)) == 0) + && ins_compl_add_infercase(p, (int)STRLEN(p), +! FALSE, NULL, *dir, 0) == OK) + /* if dir was BACKWARD then honor it just once */ + *dir = FORWARD; + } +--- 15662,15668 ---- + ? MB_STRNICMP(p, pat, STRLEN(pat)) == 0 + : STRNCMP(p, pat, STRLEN(pat)) == 0) + && ins_compl_add_infercase(p, (int)STRLEN(p), +! p_ic, NULL, *dir, 0) == OK) + /* if dir was BACKWARD then honor it just once */ + *dir = FORWARD; + } +*** ../vim-7.0.067/src/version.c Tue Aug 29 16:10:54 2006 +--- src/version.c Tue Aug 29 16:13:49 2006 +*************** +*** 668,669 **** +--- 668,671 ---- + { /* Add new patch number below this line */ ++ /**/ ++ 68, + /**/ + +-- +hundred-and-one symptoms of being an internet addict: +266. You hear most of your jokes via e-mail instead of in person. + + /// Bram Moolenaar -- Bram@Moolenaar.net -- http://www.Moolenaar.net \\\ +/// sponsor Vim, vote for features -- http://www.Vim.org/sponsor/ \\\ +\\\ download, build and distribute -- http://www.A-A-P.org /// + \\\ help me help AIDS victims -- http://ICCF-Holland.org /// --- vim-7.0.orig/upstream/patches/7.0.152 +++ vim-7.0/upstream/patches/7.0.152 @@ -0,0 +1,74 @@ +To: vim-dev@vim.org +Subject: Patch 7.0.152 +Fcc: outbox +From: Bram Moolenaar +Mime-Version: 1.0 +Content-Type: text/plain; charset=ISO-8859-1 +Content-Transfer-Encoding: 8bit +------------ + +Patch 7.0.152 +Problem: Crash when using lesstif 2. +Solution: Fill in the extension field. (Ben Hutchings) +Files: src/gui_xmebw.c + + +*** ../vim-7.0.151/src/gui_xmebw.c Sat May 13 17:26:10 2006 +--- src/gui_xmebw.c Tue Oct 24 22:27:53 2006 +*************** +*** 138,143 **** +--- 138,156 ---- + } + }; + ++ /* This is needed to work around a bug in Lesstif 2, leaving the extension ++ * NULL somehow results in getting it set to an invalid pointer. */ ++ XmPrimitiveClassExtRec xmEnhancedButtonPrimClassExtRec = ++ { ++ /* next_extension */ NULL, ++ /* record_type */ NULLQUARK, ++ /* version */ XmPrimitiveClassExtVersion, ++ /* record_size */ sizeof(XmPrimitiveClassExtRec), ++ /* widget_baseline */ XmInheritBaselineProc, ++ /* widget_display_rect */ XmInheritDisplayRectProc, ++ /* widget_margins */ NULL ++ }; ++ + XmEnhancedButtonClassRec xmEnhancedButtonClassRec = + { + { +*************** +*** 184,190 **** + /* arm and activate */ XmInheritArmAndActivate, + /* synthetic resources */ NULL, + /* number of syn res */ 0, +! /* extension */ NULL, + }, + + /* label_class fields */ +--- 197,203 ---- + /* arm and activate */ XmInheritArmAndActivate, + /* synthetic resources */ NULL, + /* number of syn res */ 0, +! /* extension */ (XtPointer)&xmEnhancedButtonPrimClassExtRec, + }, + + /* label_class fields */ +*** ../vim-7.0.151/src/version.c Tue Oct 24 22:01:55 2006 +--- src/version.c Tue Oct 24 22:30:40 2006 +*************** +*** 668,669 **** +--- 668,671 ---- + { /* Add new patch number below this line */ ++ /**/ ++ 152, + /**/ + +-- +hundred-and-one symptoms of being an internet addict: +110. You actually volunteer to become your employer's webmaster. + + /// Bram Moolenaar -- Bram@Moolenaar.net -- http://www.Moolenaar.net \\\ +/// sponsor Vim, vote for features -- http://www.Vim.org/sponsor/ \\\ +\\\ download, build and distribute -- http://www.A-A-P.org /// + \\\ help me help AIDS victims -- http://ICCF-Holland.org /// --- vim-7.0.orig/upstream/patches/7.0.041 +++ vim-7.0/upstream/patches/7.0.041 @@ -0,0 +1,81 @@ +To: vim-dev@vim.org +Subject: Patch 7.0.041 +Fcc: outbox +From: Bram Moolenaar +Mime-Version: 1.0 +Content-Type: text/plain; charset=ISO-8859-1 +Content-Transfer-Encoding: 8bit +------------ + +Patch 7.0.041 +Problem: cursor([1, 1]) doesn't work. (Peter Hodge) +Solution: Allow leaving out the third item of the list and use zero for the + virtual column offset. +Files: src/eval.c + + +*** ../vim-7.0.040/src/eval.c Sun Jul 23 21:52:16 2006 +--- src/eval.c Mon Jul 10 23:03:13 2006 +*************** +*** 16465,16473 **** + long i = 0; + long n; + +! /* List must be: [fnum, lnum, col, coladd] */ +! if (arg->v_type != VAR_LIST || l == NULL +! || l->lv_len != (fnump == NULL ? 3 : 4)) + return FAIL; + + if (fnump != NULL) +--- 16465,16476 ---- + long i = 0; + long n; + +! /* List must be: [fnum, lnum, col, coladd], where "fnum" is only there +! * when "fnump" isn't NULL and "coladd" is optional. */ +! if (arg->v_type != VAR_LIST +! || l == NULL +! || l->lv_len < (fnump == NULL ? 2 : 3) +! || l->lv_len > (fnump == NULL ? 3 : 4)) + return FAIL; + + if (fnump != NULL) +*************** +*** 16493,16500 **** + #ifdef FEAT_VIRTUALEDIT + n = list_find_nr(l, i, NULL); + if (n < 0) +! return FAIL; +! posp->coladd = n; + #endif + + return OK; +--- 16496,16504 ---- + #ifdef FEAT_VIRTUALEDIT + n = list_find_nr(l, i, NULL); + if (n < 0) +! posp->coladd = 0; +! else +! posp->coladd = n; + #endif + + return OK; +*** ../vim-7.0.040/src/version.c Sun Jul 23 21:52:16 2006 +--- src/version.c Sun Jul 23 21:59:43 2006 +*************** +*** 668,669 **** +--- 668,671 ---- + { /* Add new patch number below this line */ ++ /**/ ++ 41, + /**/ + +-- +hundred-and-one symptoms of being an internet addict: +43. You tell the kids they can't use the computer because "Daddy's got work to + do" and you don't even have a job. + + /// Bram Moolenaar -- Bram@Moolenaar.net -- http://www.Moolenaar.net \\\ +/// sponsor Vim, vote for features -- http://www.Vim.org/sponsor/ \\\ +\\\ download, build and distribute -- http://www.A-A-P.org /// + \\\ help me help AIDS victims -- http://ICCF-Holland.org /// --- vim-7.0.orig/upstream/patches/7.0.144 +++ vim-7.0/upstream/patches/7.0.144 @@ -0,0 +1,219 @@ +To: vim-dev@vim.org +Subject: Patch 7.0.144 +Fcc: outbox +From: Bram Moolenaar +Mime-Version: 1.0 +Content-Type: text/plain; charset=ISO-8859-1 +Content-Transfer-Encoding: 8bit +------------ + +Patch 7.0.144 +Problem: May compare two unrelated pointers when matching a pattern against + a string. (Dominique Pelle) +Solution: Avoid calling reg_getline() when REG_MULTI is false. +Files: src/regexp.c + + +*** ../vim-7.0.143/src/regexp.c Tue Aug 29 17:28:56 2006 +--- src/regexp.c Tue Oct 17 18:30:18 2006 +*************** +*** 3777,3784 **** + + op = OP(scan); + /* Check for character class with NL added. */ +! if (!reg_line_lbr && WITH_NL(op) && *reginput == NUL +! && reglnum <= reg_maxline) + { + reg_nextline(); + } +--- 3777,3784 ---- + + op = OP(scan); + /* Check for character class with NL added. */ +! if (!reg_line_lbr && WITH_NL(op) && REG_MULTI +! && *reginput == NUL && reglnum <= reg_maxline) + { + reg_nextline(); + } +*************** +*** 4855,4862 **** + break; + + case NEWL: +! if ((c != NUL || reglnum > reg_maxline || reg_line_lbr) +! && (c != '\n' || !reg_line_lbr)) + status = RA_NOMATCH; + else if (reg_line_lbr) + ADVANCE_REGINPUT(); +--- 4855,4862 ---- + break; + + case NEWL: +! if ((c != NUL || !REG_MULTI || reglnum > reg_maxline +! || reg_line_lbr) && (c != '\n' || !reg_line_lbr)) + status = RA_NOMATCH; + else if (reg_line_lbr) + ADVANCE_REGINPUT(); +*************** +*** 5316,5323 **** + ++count; + mb_ptr_adv(scan); + } +! if (!WITH_NL(OP(p)) || reglnum > reg_maxline || reg_line_lbr +! || count == maxcount) + break; + ++count; /* count the line-break */ + reg_nextline(); +--- 5316,5323 ---- + ++count; + mb_ptr_adv(scan); + } +! if (!REG_MULTI || !WITH_NL(OP(p)) || reglnum > reg_maxline +! || reg_line_lbr || count == maxcount) + break; + ++count; /* count the line-break */ + reg_nextline(); +*************** +*** 5341,5347 **** + } + else if (*scan == NUL) + { +! if (!WITH_NL(OP(p)) || reglnum > reg_maxline || reg_line_lbr) + break; + reg_nextline(); + scan = reginput; +--- 5341,5348 ---- + } + else if (*scan == NUL) + { +! if (!REG_MULTI || !WITH_NL(OP(p)) || reglnum > reg_maxline +! || reg_line_lbr) + break; + reg_nextline(); + scan = reginput; +*************** +*** 5370,5376 **** + } + else if (*scan == NUL) + { +! if (!WITH_NL(OP(p)) || reglnum > reg_maxline || reg_line_lbr) + break; + reg_nextline(); + scan = reginput; +--- 5371,5378 ---- + } + else if (*scan == NUL) + { +! if (!REG_MULTI || !WITH_NL(OP(p)) || reglnum > reg_maxline +! || reg_line_lbr) + break; + reg_nextline(); + scan = reginput; +*************** +*** 5399,5405 **** + } + else if (*scan == NUL) + { +! if (!WITH_NL(OP(p)) || reglnum > reg_maxline || reg_line_lbr) + break; + reg_nextline(); + scan = reginput; +--- 5401,5408 ---- + } + else if (*scan == NUL) + { +! if (!REG_MULTI || !WITH_NL(OP(p)) || reglnum > reg_maxline +! || reg_line_lbr) + break; + reg_nextline(); + scan = reginput; +*************** +*** 5424,5430 **** + { + if (*scan == NUL) + { +! if (!WITH_NL(OP(p)) || reglnum > reg_maxline || reg_line_lbr) + break; + reg_nextline(); + scan = reginput; +--- 5427,5434 ---- + { + if (*scan == NUL) + { +! if (!REG_MULTI || !WITH_NL(OP(p)) || reglnum > reg_maxline +! || reg_line_lbr) + break; + reg_nextline(); + scan = reginput; +*************** +*** 5454,5460 **** + #endif + if (*scan == NUL) + { +! if (!WITH_NL(OP(p)) || reglnum > reg_maxline || reg_line_lbr) + break; + reg_nextline(); + scan = reginput; +--- 5458,5465 ---- + #endif + if (*scan == NUL) + { +! if (!REG_MULTI || !WITH_NL(OP(p)) || reglnum > reg_maxline +! || reg_line_lbr) + break; + reg_nextline(); + scan = reginput; +*************** +*** 5617,5623 **** + #endif + if (*scan == NUL) + { +! if (!WITH_NL(OP(p)) || reglnum > reg_maxline || reg_line_lbr) + break; + reg_nextline(); + scan = reginput; +--- 5622,5629 ---- + #endif + if (*scan == NUL) + { +! if (!REG_MULTI || !WITH_NL(OP(p)) || reglnum > reg_maxline +! || reg_line_lbr) + break; + reg_nextline(); + scan = reginput; +*************** +*** 5646,5653 **** + + case NEWL: + while (count < maxcount +! && ((*scan == NUL && reglnum <= reg_maxline && !reg_line_lbr) +! || (*scan == '\n' && reg_line_lbr))) + { + count++; + if (reg_line_lbr) +--- 5652,5659 ---- + + case NEWL: + while (count < maxcount +! && ((*scan == NUL && reglnum <= reg_maxline && !reg_line_lbr +! && REG_MULTI) || (*scan == '\n' && reg_line_lbr))) + { + count++; + if (reg_line_lbr) +*** ../vim-7.0.143/src/version.c Tue Oct 17 18:36:03 2006 +--- src/version.c Tue Oct 17 18:48:51 2006 +*************** +*** 668,669 **** +--- 668,671 ---- + { /* Add new patch number below this line */ ++ /**/ ++ 144, + /**/ + +-- +Be thankful to be in a traffic jam, because it means you own a car. + + /// Bram Moolenaar -- Bram@Moolenaar.net -- http://www.Moolenaar.net \\\ +/// sponsor Vim, vote for features -- http://www.Vim.org/sponsor/ \\\ +\\\ download, build and distribute -- http://www.A-A-P.org /// + \\\ help me help AIDS victims -- http://ICCF-Holland.org /// --- vim-7.0.orig/upstream/patches/7.0.126 +++ vim-7.0/upstream/patches/7.0.126 @@ -0,0 +1,63 @@ +To: vim-dev@vim.org +Subject: Patch 7.0.126 +Fcc: outbox +From: Bram Moolenaar +Mime-Version: 1.0 +Content-Type: text/plain; charset=ISO-8859-1 +Content-Transfer-Encoding: 8bit +------------ + +Patch 7.0.126 +Problem: When 'formatexpr' uses setline() and later internal formatting is + used undo information is not correct. (Jiri Cerny, Benji Fisher) +Solution: Set ins_need_undo after using 'formatexpr'. +Files: src/edit.c + + +*** ../vim-7.0.125/src/edit.c Fri Oct 6 20:39:58 2006 +--- src/edit.c Tue Oct 10 12:46:04 2006 +*************** +*** 5333,5340 **** + /* Format with 'formatexpr' when it's set. Use internal formatting + * when 'formatexpr' isn't set or it returns non-zero. */ + #if defined(FEAT_EVAL) +! if (*curbuf->b_p_fex == NUL +! || fex_format(curwin->w_cursor.lnum, 1L, c) != 0) + #endif + internal_format(textwidth, second_indent, flags, c == NUL); + } +--- 5333,5348 ---- + /* Format with 'formatexpr' when it's set. Use internal formatting + * when 'formatexpr' isn't set or it returns non-zero. */ + #if defined(FEAT_EVAL) +! int do_internal = TRUE; +! +! if (*curbuf->b_p_fex != NUL) +! { +! do_internal = (fex_format(curwin->w_cursor.lnum, 1L, c) != 0); +! /* It may be required to save for undo again, e.g. when setline() +! * was called. */ +! ins_need_undo = TRUE; +! } +! if (do_internal) + #endif + internal_format(textwidth, second_indent, flags, c == NUL); + } +*** ../vim-7.0.125/src/version.c Tue Oct 10 13:27:30 2006 +--- src/version.c Tue Oct 10 15:47:20 2006 +*************** +*** 668,669 **** +--- 668,671 ---- + { /* Add new patch number below this line */ ++ /**/ ++ 126, + /**/ + +-- +How To Keep A Healthy Level Of Insanity: +16. Have your coworkers address you by your wrestling name, Rock Hard Kim. + + /// Bram Moolenaar -- Bram@Moolenaar.net -- http://www.Moolenaar.net \\\ +/// sponsor Vim, vote for features -- http://www.Vim.org/sponsor/ \\\ +\\\ download, build and distribute -- http://www.A-A-P.org /// + \\\ help me help AIDS victims -- http://ICCF-Holland.org /// --- vim-7.0.orig/upstream/patches/7.0.061 +++ vim-7.0/upstream/patches/7.0.061 @@ -0,0 +1,70 @@ +To: vim-dev@vim.org +Subject: Patch 7.0.061 +Fcc: outbox +From: Bram Moolenaar +Mime-Version: 1.0 +Content-Type: text/plain; charset=ISO-8859-1 +Content-Transfer-Encoding: 8bit +------------ + +Patch 7.0.061 +Problem: Insert mode completion for Vim commands may crash if there is + nothing to complete. +Solution: Instead of freeing the pattern make it empty, so that a "not + found" error is given. (Yukihiro Nakadaira) +Files: src/edit.c + + +*** ../vim-7.0.060/src/edit.c Wed Aug 16 16:24:58 2006 +--- src/edit.c Wed Aug 16 21:20:29 2006 +*************** +*** 4691,4708 **** + (int)STRLEN(compl_pattern), curs_col); + if (compl_xp.xp_context == EXPAND_UNSUCCESSFUL + || compl_xp.xp_context == EXPAND_NOTHING) +! { + compl_col = curs_col; +- compl_length = 0; +- vim_free(compl_pattern); +- compl_pattern = NULL; +- } + else +! { +! startcol = (int)(compl_xp.xp_pattern - compl_pattern); +! compl_col = startcol; +! compl_length = curs_col - startcol; +! } + } + else if (ctrl_x_mode == CTRL_X_FUNCTION || ctrl_x_mode == CTRL_X_OMNI) + { +--- 4692,4703 ---- + (int)STRLEN(compl_pattern), curs_col); + if (compl_xp.xp_context == EXPAND_UNSUCCESSFUL + || compl_xp.xp_context == EXPAND_NOTHING) +! /* No completion possible, use an empty pattern to get a +! * "pattern not found" message. */ + compl_col = curs_col; + else +! compl_col = (int)(compl_xp.xp_pattern - compl_pattern); +! compl_length = curs_col - compl_col; + } + else if (ctrl_x_mode == CTRL_X_FUNCTION || ctrl_x_mode == CTRL_X_OMNI) + { +*** ../vim-7.0.060/src/version.c Wed Aug 16 19:34:59 2006 +--- src/version.c Wed Aug 16 21:25:03 2006 +*************** +*** 668,669 **** +--- 668,671 ---- + { /* Add new patch number below this line */ ++ /**/ ++ 61, + /**/ + +-- +hundred-and-one symptoms of being an internet addict: +165. You have a web page burned into your glasses + + /// Bram Moolenaar -- Bram@Moolenaar.net -- http://www.Moolenaar.net \\\ +/// sponsor Vim, vote for features -- http://www.Vim.org/sponsor/ \\\ +\\\ download, build and distribute -- http://www.A-A-P.org /// + \\\ help me help AIDS victims -- http://ICCF-Holland.org /// --- vim-7.0.orig/upstream/patches/7.0.007 +++ vim-7.0/upstream/patches/7.0.007 @@ -0,0 +1,68 @@ +To: vim-dev@vim.org +Subject: Patch 7.0.007 +Fcc: outbox +From: Bram Moolenaar +Mime-Version: 1.0 +Content-Type: text/plain; charset=ISO-8859-1 +Content-Transfer-Encoding: 8bit +------------ + +Patch 7.0.007 +Problem: AIX: compiling fails for message.c. (Ruediger Hornig) +Solution: Move the #if outside of memchr(). +Files: src/message.c + + +*** ../vim-7.0.006/src/message.c Wed May 10 15:22:50 2006 +--- src/message.c Tue May 9 10:36:56 2006 +*************** +*** 4175,4189 **** + str_arg_l = 0; + else + { +! /* memchr on HP does not like n > 2^31 !!! */ +! char *q = memchr(str_arg, '\0', + #if SIZEOF_INT <= 2 +! precision + #else +! precision <= (size_t)0x7fffffffL ? precision +! : (size_t)0x7fffffffL + #endif +- ); + str_arg_l = (q == NULL) ? precision : q - str_arg; + } + break; +--- 4175,4190 ---- + str_arg_l = 0; + else + { +! /* Don't put the #if inside memchr(), it can be a +! * macro. */ + #if SIZEOF_INT <= 2 +! char *q = memchr(str_arg, '\0', precision); + #else +! /* memchr on HP does not like n > 2^31 !!! */ +! char *q = memchr(str_arg, '\0', +! precision <= (size_t)0x7fffffffL ? precision +! : (size_t)0x7fffffffL); + #endif + str_arg_l = (q == NULL) ? precision : q - str_arg; + } + break; +*** ../vim-7.0.006/src/version.c Wed May 10 17:26:37 2006 +--- src/version.c Wed May 10 17:36:03 2006 +*************** +*** 668,669 **** +--- 668,671 ---- + { /* Add new patch number below this line */ ++ /**/ ++ 7, + /**/ + +-- +Momento mori, ergo carpe diem + + /// Bram Moolenaar -- Bram@Moolenaar.net -- http://www.Moolenaar.net \\\ +/// sponsor Vim, vote for features -- http://www.Vim.org/sponsor/ \\\ +\\\ download, build and distribute -- http://www.A-A-P.org /// + \\\ help me help AIDS victims -- http://ICCF-Holland.org /// --- vim-7.0.orig/upstream/patches/7.0.081 +++ vim-7.0/upstream/patches/7.0.081 @@ -0,0 +1,67 @@ +To: vim-dev@vim.org +Subject: Patch 7.0.081 +Fcc: outbox +From: Bram Moolenaar +Mime-Version: 1.0 +Content-Type: text/plain; charset=ISO-8859-1 +Content-Transfer-Encoding: 8bit +------------ + +Patch 7.0.081 +Problem: Command line completion doesn't work for a shell command with an + absolute path. +Solution: Don't use $PATH when there is an absolute path. +Files: src/ex_getln.c + + +*** ../vim-7.0.080/src/ex_getln.c Wed Aug 16 16:24:58 2006 +--- src/ex_getln.c Sat Sep 2 17:51:03 2006 +*************** +*** 4521,4527 **** + flags |= EW_FILE | EW_EXEC; + + /* For an absolute name we don't use $PATH. */ +! if ((pat[0] == '.' && (vim_ispathsep(pat[1]) + || (pat[1] == '.' && vim_ispathsep(pat[2]))))) + path = (char_u *)"."; + else +--- 4521,4529 ---- + flags |= EW_FILE | EW_EXEC; + + /* For an absolute name we don't use $PATH. */ +! if (mch_isFullName(pat)) +! path = (char_u *)" "; +! else if ((pat[0] == '.' && (vim_ispathsep(pat[1]) + || (pat[1] == '.' && vim_ispathsep(pat[2]))))) + path = (char_u *)"."; + else +*************** +*** 4534,4539 **** +--- 4536,4544 ---- + ga_init2(&ga, (int)sizeof(char *), 10); + for (s = path; *s != NUL; s = e) + { ++ if (*s == ' ') ++ ++s; /* Skip space used for absolute path name. */ ++ + #if defined(MSDOS) || defined(MSWIN) || defined(OS2) + e = vim_strchr(s, ';'); + #else +*** ../vim-7.0.080/src/version.c Sat Sep 2 16:36:46 2006 +--- src/version.c Sat Sep 2 17:54:35 2006 +*************** +*** 668,669 **** +--- 668,671 ---- + { /* Add new patch number below this line */ ++ /**/ ++ 81, + /**/ + +-- +TALL KNIGHT OF NI: Ni! + "Monty Python and the Holy Grail" PYTHON (MONTY) PICTURES LTD + + /// Bram Moolenaar -- Bram@Moolenaar.net -- http://www.Moolenaar.net \\\ +/// sponsor Vim, vote for features -- http://www.Vim.org/sponsor/ \\\ +\\\ download, build and distribute -- http://www.A-A-P.org /// + \\\ help me help AIDS victims -- http://ICCF-Holland.org /// --- vim-7.0.orig/upstream/patches/7.0.037 +++ vim-7.0/upstream/patches/7.0.037 @@ -0,0 +1,63 @@ +To: vim-dev@vim.org +Subject: Patch 7.0.037 +Fcc: outbox +From: Bram Moolenaar +Mime-Version: 1.0 +Content-Type: text/plain; charset=ISO-8859-1 +Content-Transfer-Encoding: 8bit +------------ + +Patch 7.0.037 +Problem: Crash when resizing the GUI window vertically when there is a line + that doesn't fit. +Solution: Don't redraw while the screen data is invalid. +Files: src/screen.c + + +*** ../vim-7.0.036/src/screen.c Tue Jul 11 22:36:19 2006 +--- src/screen.c Tue Jul 11 21:33:53 2006 +*************** +*** 7129,7134 **** +--- 7129,7140 ---- + return; + entered = TRUE; + ++ /* ++ * Note that the window sizes are updated before reallocating the arrays, ++ * thus we must not redraw here! ++ */ ++ ++RedrawingDisabled; ++ + win_new_shellsize(); /* fit the windows in the new sized shell */ + + comp_col(); /* recompute columns for shown command and ruler */ +*************** +*** 7363,7368 **** +--- 7369,7375 ---- + #endif + + entered = FALSE; ++ --RedrawingDisabled; + + #ifdef FEAT_AUTOCMD + if (starting == 0) +*** ../vim-7.0.036/src/version.c Tue Jul 11 22:36:19 2006 +--- src/version.c Tue Jul 11 22:38:39 2006 +*************** +*** 668,669 **** +--- 668,671 ---- + { /* Add new patch number below this line */ ++ /**/ ++ 37, + /**/ + +-- +For society, it's probably a good thing that engineers value function over +appearance. For example, you wouldn't want engineers to build nuclear power +plants that only _look_ like they would keep all the radiation inside. + (Scott Adams - The Dilbert principle) + + /// Bram Moolenaar -- Bram@Moolenaar.net -- http://www.Moolenaar.net \\\ +/// sponsor Vim, vote for features -- http://www.Vim.org/sponsor/ \\\ +\\\ download, build and distribute -- http://www.A-A-P.org /// + \\\ help me help AIDS victims -- http://ICCF-Holland.org /// --- vim-7.0.orig/upstream/patches/7.0.065 +++ vim-7.0/upstream/patches/7.0.065 @@ -0,0 +1,52 @@ +To: vim-dev@vim.org +Subject: Patch 7.0.065 (extra) +Fcc: outbox +From: Bram Moolenaar +Mime-Version: 1.0 +Content-Type: text/plain; charset=ISO-8859-1 +Content-Transfer-Encoding: 8bit +------------ + +Patch 7.0.065 (extra) +Problem: Mac: left-right movement of the scrollwheel causes up-down + scrolling. +Solution: Ignore mouse wheel events that are not up-down. (Nicolas Weber) +Files: src/gui_mac.c + + +*** ../vim-7.0.064/src/gui_mac.c Wed May 3 00:03:26 2006 +--- src/gui_mac.c Tue Aug 22 13:41:12 2006 +*************** +*** 2480,2485 **** +--- 2480,2491 ---- + UInt32 mod; + SInt32 delta; + int_u vim_mod; ++ EventMouseWheelAxis axis; ++ ++ if (noErr == GetEventParameter(theEvent, kEventParamMouseWheelAxis, ++ typeMouseWheelAxis, NULL, sizeof(axis), NULL, &axis) ++ && axis != kEventMouseWheelAxisY) ++ goto bail; /* Vim only does up-down scrolling */ + + if (noErr != GetEventParameter(theEvent, kEventParamMouseWheelDelta, + typeSInt32, NULL, sizeof(SInt32), NULL, &delta)) +*** ../vim-7.0.064/src/version.c Tue Aug 22 19:58:22 2006 +--- src/version.c Tue Aug 22 21:38:07 2006 +*************** +*** 668,669 **** +--- 668,671 ---- + { /* Add new patch number below this line */ ++ /**/ ++ 65, + /**/ + +-- +Spam seems to be something useful to novices. Later you realize that +it's a bunch of indigestable junk that only clogs your system. +Applies to both the food and the e-mail! + + /// Bram Moolenaar -- Bram@Moolenaar.net -- http://www.Moolenaar.net \\\ +/// sponsor Vim, vote for features -- http://www.Vim.org/sponsor/ \\\ +\\\ download, build and distribute -- http://www.A-A-P.org /// + \\\ help me help AIDS victims -- http://ICCF-Holland.org /// --- vim-7.0.orig/upstream/patches/7.0.026 +++ vim-7.0/upstream/patches/7.0.026 @@ -0,0 +1,60 @@ +To: vim-dev@vim.org +Subject: Patch 7.0.026 +Fcc: outbox +From: Bram Moolenaar +Mime-Version: 1.0 +Content-Type: text/plain; charset=ISO-8859-1 +Content-Transfer-Encoding: 8bit +------------ + +Patch 7.0.026 +Problem: Using libcall() may show an old error. +Solution: Invoke dlerror() to clear a previous error. (Yukihiro Nakadaira) +Files: src/os_unix.c + + +*** ../vim-7.0.025/src/os_unix.c Wed May 3 00:01:30 2006 +--- src/os_unix.c Sat Jun 17 21:00:14 2006 +*************** +*** 5757,5764 **** + int retval_int = 0; + int success = FALSE; + +! /* Get a handle to the DLL module. */ + # if defined(USE_DLOPEN) + hinstLib = dlopen((char *)libname, RTLD_LAZY + # ifdef RTLD_LOCAL + | RTLD_LOCAL +--- 5758,5770 ---- + int retval_int = 0; + int success = FALSE; + +! /* +! * Get a handle to the DLL module. +! */ + # if defined(USE_DLOPEN) ++ /* First clear any error, it's not cleared by the dlopen() call. */ ++ (void)dlerror(); ++ + hinstLib = dlopen((char *)libname, RTLD_LAZY + # ifdef RTLD_LOCAL + | RTLD_LOCAL +*** ../vim-7.0.025/src/version.c Thu Jun 22 18:02:06 2006 +--- src/version.c Thu Jun 22 18:05:10 2006 +*************** +*** 668,669 **** +--- 668,671 ---- + { /* Add new patch number below this line */ ++ /**/ ++ 26, + /**/ + +-- +BRIDGEKEEPER: What is your favorite editor? +GAWAIN: Emacs ... No, Viiiiiiiiiiimmmmmmm! + "Monty Python and the Holy editor wars" PYTHON (MONTY) SOFTWARE LTD + + /// Bram Moolenaar -- Bram@Moolenaar.net -- http://www.Moolenaar.net \\\ +/// sponsor Vim, vote for features -- http://www.Vim.org/sponsor/ \\\ +\\\ download, build and distribute -- http://www.A-A-P.org /// + \\\ help me help AIDS victims -- http://ICCF-Holland.org /// --- vim-7.0.orig/upstream/patches/7.0.105 +++ vim-7.0/upstream/patches/7.0.105 @@ -0,0 +1,50 @@ +To: vim-dev@vim.org +Subject: Patch 7.0.105 +Fcc: outbox +From: Bram Moolenaar +Mime-Version: 1.0 +Content-Type: text/plain; charset=ISO-8859-1 +Content-Transfer-Encoding: 8bit +------------ + +Patch 7.0.105 +Problem: When using incremental search the statusline ruler isn't updated. + (Christoph Koegl) +Solution: Update the statusline when it contains the ruler. +Files: src/ex_getln.c + + +*** ../vim-7.0.104/src/ex_getln.c Thu Sep 14 10:25:34 2006 +--- src/ex_getln.c Thu Sep 14 10:42:24 2006 +*************** +*** 1756,1761 **** +--- 1756,1766 ---- + end_pos = curwin->w_cursor; /* shutup gcc 4 */ + + validate_cursor(); ++ # ifdef FEAT_WINDOWS ++ /* May redraw the status line to show the cursor position. */ ++ if (p_ru && curwin->w_status_height > 0) ++ curwin->w_redr_status = TRUE; ++ # endif + + save_cmdline(&save_ccline); + update_screen(SOME_VALID); +*** ../vim-7.0.104/src/version.c Thu Sep 14 11:07:08 2006 +--- src/version.c Thu Sep 14 11:25:37 2006 +*************** +*** 668,669 **** +--- 668,671 ---- + { /* Add new patch number below this line */ ++ /**/ ++ 105, + /**/ + +-- +An indication you must be a manager: +You feel sorry for Dilbert's boss. + + /// Bram Moolenaar -- Bram@Moolenaar.net -- http://www.Moolenaar.net \\\ +/// sponsor Vim, vote for features -- http://www.Vim.org/sponsor/ \\\ +\\\ download, build and distribute -- http://www.A-A-P.org /// + \\\ help me help AIDS victims -- http://ICCF-Holland.org /// --- vim-7.0.orig/upstream/patches/7.0.025 +++ vim-7.0/upstream/patches/7.0.025 @@ -0,0 +1,80 @@ +To: vim-dev@vim.org +Subject: Patch 7.0.025 +Fcc: outbox +From: Bram Moolenaar +Mime-Version: 1.0 +Content-Type: text/plain; charset=ISO-8859-1 +Content-Transfer-Encoding: 8bit +------------ + +Patch 7.0.025 +Problem: Crash when removing an element of a:000. (Nikolai Weibull) +Solution: Mark the a:000 list with VAR_FIXED. +Files: src/eval.c + + +*** ../vim-7.0.024/src/eval.c Thu Jun 22 17:33:49 2006 +--- src/eval.c Thu Jun 22 17:56:50 2006 +*************** +*** 13250,13256 **** + if (argvars[2].v_type != VAR_UNKNOWN) + EMSG2(_(e_toomanyarg), "remove()"); + else if ((d = argvars[0].vval.v_dict) != NULL +! && !tv_check_lock(d->dv_lock, (char_u *)"remove()")) + { + key = get_tv_string_chk(&argvars[1]); + if (key != NULL) +--- 13254,13260 ---- + if (argvars[2].v_type != VAR_UNKNOWN) + EMSG2(_(e_toomanyarg), "remove()"); + else if ((d = argvars[0].vval.v_dict) != NULL +! && !tv_check_lock(d->dv_lock, (char_u *)"remove() argument")) + { + key = get_tv_string_chk(&argvars[1]); + if (key != NULL) +*************** +*** 13270,13276 **** + else if (argvars[0].v_type != VAR_LIST) + EMSG2(_(e_listdictarg), "remove()"); + else if ((l = argvars[0].vval.v_list) != NULL +! && !tv_check_lock(l->lv_lock, (char_u *)"remove()")) + { + int error = FALSE; + +--- 13274,13280 ---- + else if (argvars[0].v_type != VAR_LIST) + EMSG2(_(e_listdictarg), "remove()"); + else if ((l = argvars[0].vval.v_list) != NULL +! && !tv_check_lock(l->lv_lock, (char_u *)"remove() argument")) + { + int error = FALSE; + +*************** +*** 19693,19698 **** +--- 19697,19703 ---- + v->di_tv.vval.v_list = &fc.l_varlist; + vim_memset(&fc.l_varlist, 0, sizeof(list_T)); + fc.l_varlist.lv_refcount = 99999; ++ fc.l_varlist.lv_lock = VAR_FIXED; + + /* + * Set a:firstline to "firstline" and a:lastline to "lastline". +*** ../vim-7.0.024/src/version.c Thu Jun 22 17:33:49 2006 +--- src/version.c Thu Jun 22 17:59:17 2006 +*************** +*** 668,669 **** +--- 668,671 ---- + { /* Add new patch number below this line */ ++ /**/ ++ 25, + /**/ + +-- +BRIDGEKEEPER: What is your favorite colour? +GAWAIN: Blue ... No yelloooooww! + "Monty Python and the Holy Grail" PYTHON (MONTY) PICTURES LTD + + /// Bram Moolenaar -- Bram@Moolenaar.net -- http://www.Moolenaar.net \\\ +/// sponsor Vim, vote for features -- http://www.Vim.org/sponsor/ \\\ +\\\ download, build and distribute -- http://www.A-A-P.org /// + \\\ help me help AIDS victims -- http://ICCF-Holland.org /// --- vim-7.0.orig/upstream/patches/7.0.136 +++ vim-7.0/upstream/patches/7.0.136 @@ -0,0 +1,54 @@ +To: vim-dev@vim.org +Subject: Patch 7.0.136 +Fcc: outbox +From: Bram Moolenaar +Mime-Version: 1.0 +Content-Type: text/plain; charset=ISO-8859-1 +Content-Transfer-Encoding: 8bit +------------ + +Patch 7.0.136 +Problem: Using "O" while matching parens are highlighted may not remove the + highlighting. (Ilya Bobir) +Solution: Also trigger CursorMoved when a line is inserted under the cursor. +Files: src/misc1.c + + +*** ../vim-7.0.135/src/misc1.c Fri Sep 15 20:17:49 2006 +--- src/misc1.c Tue Oct 17 11:11:42 2006 +*************** +*** 2842,2848 **** + + #ifdef FEAT_AUTOCMD + /* when the cursor line is changed always trigger CursorMoved */ +! if (lnum <= curwin->w_cursor.lnum && lnume > curwin->w_cursor.lnum) + last_cursormoved.lnum = 0; + #endif + } +--- 2842,2849 ---- + + #ifdef FEAT_AUTOCMD + /* when the cursor line is changed always trigger CursorMoved */ +! if (lnum <= curwin->w_cursor.lnum +! && lnume + (xtra < 0 ? -xtra : xtra) > curwin->w_cursor.lnum) + last_cursormoved.lnum = 0; + #endif + } +*** ../vim-7.0.135/src/version.c Sun Oct 15 22:38:41 2006 +--- src/version.c Tue Oct 17 11:10:21 2006 +*************** +*** 668,669 **** +--- 668,671 ---- + { /* Add new patch number below this line */ ++ /**/ ++ 136, + /**/ + +-- +hundred-and-one symptoms of being an internet addict: +46. Your wife makes a new rule: "The computer cannot come to bed." + + /// Bram Moolenaar -- Bram@Moolenaar.net -- http://www.Moolenaar.net \\\ +/// sponsor Vim, vote for features -- http://www.Vim.org/sponsor/ \\\ +\\\ download, build and distribute -- http://www.A-A-P.org /// + \\\ help me help AIDS victims -- http://ICCF-Holland.org /// --- vim-7.0.orig/upstream/patches/7.0.034 +++ vim-7.0/upstream/patches/7.0.034 @@ -0,0 +1,63 @@ +To: vim-dev@vim.org +Subject: Patch 7.0.034 +Fcc: outbox +From: Bram Moolenaar +Mime-Version: 1.0 +Content-Type: text/plain; charset=ISO-8859-1 +Content-Transfer-Encoding: 8bit +------------ + +Patch 7.0.034 +Problem: After doing completion and typing more characters or using BS + repeating with "." didn't work properly. (Martin Stubenschrott) +Solution: Don't put BS and other characters in the redo buffer right away, + do this when finishing completion. +Files: src/edit.c + + +*** ../vim-7.0.033/src/edit.c Thu Jun 22 16:48:43 2006 +--- src/edit.c Fri Jun 23 17:50:47 2006 +*************** +*** 3020,3028 **** + if ((int)(p - line) - (int)compl_col <= 0) + return K_BS; + +- /* For redo we need to repeat this backspace. */ +- AppendCharToRedobuff(K_BS); +- + /* Deleted more than what was used to find matches or didn't finish + * finding all matches: need to look for matches all over again. */ + if (curwin->w_cursor.col <= compl_col + compl_length +--- 3020,3025 ---- +*************** +*** 3121,3130 **** + else + #endif + ins_char(c); +- +- /* For redo we need to count this character so that the number of +- * backspaces is correct. */ +- AppendCharToRedobuff(c); + + /* If we didn't complete finding matches we must search again. */ + if (compl_was_interrupted) +--- 3118,3123 ---- +*** ../vim-7.0.033/src/version.c Fri Jun 23 17:26:02 2006 +--- src/version.c Fri Jun 23 17:59:04 2006 +*************** +*** 668,669 **** +--- 668,671 ---- + { /* Add new patch number below this line */ ++ /**/ ++ 34, + /**/ + +-- +A parent can be arrested if his child cannot hold back a burp during a church +service. + [real standing law in Nebraska, United States of America] + + /// Bram Moolenaar -- Bram@Moolenaar.net -- http://www.Moolenaar.net \\\ +/// sponsor Vim, vote for features -- http://www.Vim.org/sponsor/ \\\ +\\\ download, build and distribute -- http://www.A-A-P.org /// + \\\ help me help AIDS victims -- http://ICCF-Holland.org /// --- vim-7.0.orig/upstream/patches/7.0.145 +++ vim-7.0/upstream/patches/7.0.145 @@ -0,0 +1,54 @@ +To: vim-dev@vim.org +Subject: Patch 7.0.145 +Fcc: outbox +From: Bram Moolenaar +Mime-Version: 1.0 +Content-Type: text/plain; charset=ISO-8859-1 +Content-Transfer-Encoding: 8bit +------------ + +Patch 7.0.145 (after 7.0.142) +Problem: Compiler warning. +Solution: Add type cast. +Files: src/normal.c + + +*** ../vim-7.0.144/src/normal.c Tue Oct 17 16:55:47 2006 +--- src/normal.c Tue Oct 17 22:37:42 2006 +*************** +*** 2387,2393 **** + if (VIsual_select) + { + stuffcharReadbuff(Ctrl_G); +! stuffReadbuff("\"+p"); + } + else + { +--- 2387,2393 ---- + if (VIsual_select) + { + stuffcharReadbuff(Ctrl_G); +! stuffReadbuff((char_u *)"\"+p"); + } + else + { +*** ../vim-7.0.144/src/version.c Tue Oct 17 18:50:15 2006 +--- src/version.c Tue Oct 17 22:38:21 2006 +*************** +*** 668,669 **** +--- 668,671 ---- + { /* Add new patch number below this line */ ++ /**/ ++ 145, + /**/ + +-- +hundred-and-one symptoms of being an internet addict: +59. Your wife says communication is important in a marriage...so you buy + another computer and install a second phone line so the two of you can + chat. + + /// Bram Moolenaar -- Bram@Moolenaar.net -- http://www.Moolenaar.net \\\ +/// sponsor Vim, vote for features -- http://www.Vim.org/sponsor/ \\\ +\\\ download, build and distribute -- http://www.A-A-P.org /// + \\\ help me help AIDS victims -- http://ICCF-Holland.org /// --- vim-7.0.orig/upstream/patches/7.0.054 +++ vim-7.0/upstream/patches/7.0.054 @@ -0,0 +1,89 @@ +To: vim-dev@vim.org +Subject: Patch 7.0.054 +Fcc: outbox +From: Bram Moolenaar +Mime-Version: 1.0 +Content-Type: text/plain; charset=ISO-8859-1 +Content-Transfer-Encoding: 8bit +------------ + +Patch 7.0.054 +Problem: Mac: Using a menu name that only has a mnemonic or accelerator + causes a crash. (Elliot Shank) +Solution: Check for an empty menu name. Also delete empty submenus that + were created before detecting the error. +Files: src/menu.c + + +*** ../vim-7.0.053/src/menu.c Wed May 3 23:28:47 2006 +--- src/menu.c Tue Aug 8 20:53:25 2006 +*************** +*** 511,516 **** +--- 511,524 ---- + * name (without mnemonic and accelerator text). */ + next_name = menu_name_skip(name); + dname = menu_text(name, NULL, NULL); ++ if (dname == NULL) ++ goto erret; ++ if (*dname == NUL) ++ { ++ /* Only a mnemonic or accelerator is not valid. */ ++ EMSG(_("E792: Empty menu name")); ++ goto erret; ++ } + + /* See if it's already there */ + lower_pri = menup; +*************** +*** 704,709 **** +--- 712,718 ---- + parent = menu; + name = next_name; + vim_free(dname); ++ dname = NULL; + if (pri_tab[pri_idx + 1] != -1) + ++pri_idx; + } +*************** +*** 793,798 **** +--- 802,823 ---- + erret: + vim_free(path_name); + vim_free(dname); ++ ++ /* Delete any empty submenu we added before discovering the error. Repeat ++ * for higher levels. */ ++ while (parent != NULL && parent->children == NULL) ++ { ++ if (parent->parent == NULL) ++ menup = &root_menu; ++ else ++ menup = &parent->parent->children; ++ for ( ; *menup != NULL && *menup != parent; menup = &((*menup)->next)) ++ ; ++ if (*menup == NULL) /* safety check */ ++ break; ++ parent = parent->parent; ++ free_menu(menup); ++ } + return FAIL; + } + +*** ../vim-7.0.053/src/version.c Tue Aug 15 22:26:04 2006 +--- src/version.c Wed Aug 16 15:53:39 2006 +*************** +*** 668,669 **** +--- 668,671 ---- + { /* Add new patch number below this line */ ++ /**/ ++ 54, + /**/ + +-- +hundred-and-one symptoms of being an internet addict: +156. You forget your friend's name but not her e-mail address. + + /// Bram Moolenaar -- Bram@Moolenaar.net -- http://www.Moolenaar.net \\\ +/// sponsor Vim, vote for features -- http://www.Vim.org/sponsor/ \\\ +\\\ download, build and distribute -- http://www.A-A-P.org /// + \\\ help me help AIDS victims -- http://ICCF-Holland.org /// --- vim-7.0.orig/upstream/patches/7.0.124 +++ vim-7.0/upstream/patches/7.0.124 @@ -0,0 +1,87 @@ +To: vim-dev@vim.org +Subject: Patch 7.0.124 +Fcc: outbox +From: Bram Moolenaar +Mime-Version: 1.0 +Content-Type: text/plain; charset=ISO-8859-1 +Content-Transfer-Encoding: 8bit +------------ + +Patch 7.0.124 +Problem: getwinvar() obtains a dictionary with window-local variables, but + it's always for the current window. +Solution: Get the variables of the specified window. (Geoff Reedy) +Files: src/eval.c + + +*** ../vim-7.0.123/src/eval.c Tue Oct 3 14:43:31 2006 +--- src/eval.c Fri Oct 6 21:08:57 2006 +*************** +*** 10432,10451 **** + + if (win != NULL && varname != NULL) + { +! if (*varname == '&') /* window-local-option */ +! { +! /* Set curwin to be our win, temporarily. Also set curbuf, so +! * that we can get buffer-local options. */ +! oldcurwin = curwin; +! curwin = win; +! curbuf = win->w_buffer; + + get_option_tv(&varname, rettv, 1); +- +- /* restore previous notion of curwin */ +- curwin = oldcurwin; +- curbuf = curwin->w_buffer; +- } + else + { + if (*varname == NUL) +--- 10432,10445 ---- + + if (win != NULL && varname != NULL) + { +! /* Set curwin to be our win, temporarily. Also set curbuf, so +! * that we can get buffer-local options. */ +! oldcurwin = curwin; +! curwin = win; +! curbuf = win->w_buffer; + ++ if (*varname == '&') /* window-local-option */ + get_option_tv(&varname, rettv, 1); + else + { + if (*varname == NUL) +*************** +*** 10458,10463 **** +--- 10452,10461 ---- + if (v != NULL) + copy_tv(&v->di_tv, rettv); + } ++ ++ /* restore previous notion of curwin */ ++ curwin = oldcurwin; ++ curbuf = curwin->w_buffer; + } + + --emsg_off; +*** ../vim-7.0.123/src/version.c Tue Oct 10 11:41:44 2006 +--- src/version.c Tue Oct 10 12:53:15 2006 +*************** +*** 668,669 **** +--- 668,671 ---- + { /* Add new patch number below this line */ ++ /**/ ++ 124, + /**/ + +-- +How To Keep A Healthy Level Of Insanity: +14. Put mosquito netting around your work area. Play a tape of jungle + sounds all day. + + /// Bram Moolenaar -- Bram@Moolenaar.net -- http://www.Moolenaar.net \\\ +/// sponsor Vim, vote for features -- http://www.Vim.org/sponsor/ \\\ +\\\ download, build and distribute -- http://www.A-A-P.org /// + \\\ help me help AIDS victims -- http://ICCF-Holland.org /// --- vim-7.0.orig/upstream/patches/7.0.093 +++ vim-7.0/upstream/patches/7.0.093 @@ -0,0 +1,74 @@ +To: vim-dev@vim.org +Subject: Patch 7.0.093 +Fcc: outbox +From: Bram Moolenaar +Mime-Version: 1.0 +Content-Type: text/plain; charset=ISO-8859-1 +Content-Transfer-Encoding: 8bit +------------ + +Patch 7.0.093 +Problem: The matchparen plugin can't handle a 'matchpairs' value where a + colon is matched. +Solution: Change the split() that is used to change 'matchpairs' into a + List. +Files: runtime/plugin/matchparen.vim + + +*** ../vim-7.0.092/runtime/plugin/matchparen.vim Wed Sep 6 22:13:48 2006 +--- runtime/plugin/matchparen.vim Sat Sep 9 13:35:54 2006 +*************** +*** 1,6 **** + " Vim plugin for showing matching parens + " Maintainer: Bram Moolenaar +! " Last Change: 2006 Jun 26 + + " Exit quickly when: + " - this plugin was already loaded (or disabled) +--- 1,6 ---- + " Vim plugin for showing matching parens + " Maintainer: Bram Moolenaar +! " Last Change: 2006 Sep 09 + + " Exit quickly when: + " - this plugin was already loaded (or disabled) +*************** +*** 44,50 **** + let before = 0 + + let c = getline(c_lnum)[c_col - 1] +! let plist = split(&matchpairs, ':\|,') + let i = index(plist, c) + if i < 0 + " not found, in Insert mode try character before the cursor +--- 44,50 ---- + let before = 0 + + let c = getline(c_lnum)[c_col - 1] +! let plist = split(&matchpairs, '.\zs[:,]') + let i = index(plist, c) + if i < 0 + " not found, in Insert mode try character before the cursor +*** ../vim-7.0.092/src/version.c Sat Sep 9 12:05:39 2006 +--- src/version.c Sat Sep 9 13:29:58 2006 +*************** +*** 668,669 **** +--- 668,671 ---- + { /* Add new patch number below this line */ ++ /**/ ++ 93, + /**/ + +-- +BLACK KNIGHT: I move for no man. +ARTHUR: So be it! + [hah] [parry thrust] + [ARTHUR chops the BLACK KNIGHT's left arm off] +ARTHUR: Now stand aside, worthy adversary. +BLACK KNIGHT: 'Tis but a scratch. + The Quest for the Holy Grail (Monty Python) + + /// Bram Moolenaar -- Bram@Moolenaar.net -- http://www.Moolenaar.net \\\ +/// sponsor Vim, vote for features -- http://www.Vim.org/sponsor/ \\\ +\\\ download, build and distribute -- http://www.A-A-P.org /// + \\\ help me help AIDS victims -- http://ICCF-Holland.org /// --- vim-7.0.orig/upstream/patches/7.0.015 +++ vim-7.0/upstream/patches/7.0.015 @@ -0,0 +1,204 @@ +To: vim-dev@vim.org +Subject: Patch 7.0.015 +Fcc: outbox +From: Bram Moolenaar +Mime-Version: 1.0 +Content-Type: text/plain; charset=ISO-8859-1 +Content-Transfer-Encoding: 8bit +------------ + +Patch 7.0.015 +Problem: Athena: compilation problems with modern compiler. +Solution: Avoid type casts for lvalue. (Alexey Froloff) +Files: src/gui_at_fs.c + + +*** ../vim-7.0.014/src/gui_at_fs.c Wed May 10 15:22:49 2006 +--- src/gui_at_fs.c Fri May 12 11:26:24 2006 +*************** +*** 1861,1887 **** + XtPointer pnew; + { + SFDir *dir; +! int nw; + + dir = &(SFdirs[SFdirPtr + (int)(long)n]); + + #ifdef FEAT_GUI_NEXTAW +! if ((int)(long)pnew < 0) + { +! if ((int)(long)pnew > -SFvScrollHeight) +! (int)(long)pnew = -1; + else +! (int)(long)pnew = -SFlistSize; + } +! else if ((int)(long)pnew > 0) + { +! if ((int)(long)pnew < SFvScrollHeight) +! (int)(long)pnew = 1; + else +! (int)(long)pnew = SFlistSize; + } + #endif +! nw = dir->vOrigin + (int)(long)pnew; + + if (nw > dir->nEntries - SFlistSize) + nw = dir->nEntries - SFlistSize; +--- 1861,1887 ---- + XtPointer pnew; + { + SFDir *dir; +! int nw = (int)(long)pnew; + + dir = &(SFdirs[SFdirPtr + (int)(long)n]); + + #ifdef FEAT_GUI_NEXTAW +! if (nw < 0) + { +! if (nw > -SFvScrollHeight) +! nw = -1; + else +! nw = -SFlistSize; + } +! else if (nw > 0) + { +! if (nw < SFvScrollHeight) +! nw = 1; + else +! nw = SFlistSize; + } + #endif +! nw += dir->vOrigin; + + if (nw > dir->nEntries - SFlistSize) + nw = dir->nEntries - SFlistSize; +*************** +*** 1941,1967 **** + XtPointer pnew; + { + SFDir *dir; +! int nw; + + dir = &(SFdirs[SFdirPtr + (int)(long)n]); + + #ifdef FEAT_GUI_NEXTAW +! if ((int)(long)pnew < 0) + { +! if ((int)(long)pnew > -SFhScrollWidth) +! (int)(long)pnew = -1; + else +! (int)(long)pnew = -SFcharsPerEntry; + } +! else if ((int)(long)pnew > 0) + { +! if ((int)(long)pnew < SFhScrollWidth) +! (int)(long)pnew = 1; + else +! (int)(long)pnew = SFcharsPerEntry; + } + #endif +! nw = dir->hOrigin + (int)(long)pnew; + + if (nw > dir->nChars - SFcharsPerEntry) + nw = dir->nChars - SFcharsPerEntry; +--- 1941,1967 ---- + XtPointer pnew; + { + SFDir *dir; +! int nw = (int)(long)pnew; + + dir = &(SFdirs[SFdirPtr + (int)(long)n]); + + #ifdef FEAT_GUI_NEXTAW +! if (nw < 0) + { +! if (nw > -SFhScrollWidth) +! nw = -1; + else +! nw = -SFcharsPerEntry; + } +! else if (nw > 0) + { +! if (nw < SFhScrollWidth) +! nw = 1; + else +! nw = SFcharsPerEntry; + } + #endif +! nw += dir->hOrigin; + + if (nw > dir->nChars - SFcharsPerEntry) + nw = dir->nChars - SFcharsPerEntry; +*************** +*** 2038,2063 **** + XtPointer client_data; + XtPointer pnew; + { +! int nw; + float f; + + #ifdef FEAT_GUI_NEXTAW +! if ((int)(long)pnew < 0) + { +! if ((int)(long)pnew > -SFpathScrollWidth) +! (int)(long)pnew = -1; + else +! (int)(long)pnew = -3; + } +! else if ((int)(long)pnew > 0) + { +! if ((int)(long)pnew < SFpathScrollWidth) +! (int)(long)pnew = 1; + else +! (int)(long)pnew = 3; + } + #endif +! nw = SFdirPtr + (int)(long)pnew; + + if (nw > SFdirEnd - 3) + nw = SFdirEnd - 3; +--- 2038,2063 ---- + XtPointer client_data; + XtPointer pnew; + { +! int nw = (int)(long)pnew; + float f; + + #ifdef FEAT_GUI_NEXTAW +! if (nw < 0) + { +! if (nw > -SFpathScrollWidth) +! nw = -1; + else +! nw = -3; + } +! else if (nw > 0) + { +! if (nw < SFpathScrollWidth) +! nw = 1; + else +! nw = 3; + } + #endif +! nw += SFdirPtr; + + if (nw > SFdirEnd - 3) + nw = SFdirEnd - 3; +*** ../vim-7.0.014/src/version.c Fri May 12 19:24:33 2006 +--- src/version.c Fri May 12 19:25:57 2006 +*************** +*** 668,669 **** +--- 668,671 ---- + { /* Add new patch number below this line */ ++ /**/ ++ 15, + /**/ + +-- +hundred-and-one symptoms of being an internet addict: +127. You bring your laptop and cellular phone to church. + + /// Bram Moolenaar -- Bram@Moolenaar.net -- http://www.Moolenaar.net \\\ +/// sponsor Vim, vote for features -- http://www.Vim.org/sponsor/ \\\ +\\\ download, build and distribute -- http://www.A-A-P.org /// + \\\ help me help AIDS victims -- http://ICCF-Holland.org /// --- vim-7.0.orig/upstream/patches/7.0.018 +++ vim-7.0/upstream/patches/7.0.018 @@ -0,0 +1,54 @@ +To: vim-dev@vim.org +Subject: Patch 7.0.018 +Fcc: outbox +From: Bram Moolenaar +Mime-Version: 1.0 +Content-Type: text/plain; charset=ISO-8859-1 +Content-Transfer-Encoding: 8bit +------------ + +Patch 7.0.018 +Problem: VMS: plugins are not loaded on startup. +Solution: Remove "**" from the path. (Zoltan Arpadffy) +Files: src/main.c + + +*** ../vim-7.0.017/src/main.c Wed May 3 23:28:15 2006 +--- src/main.c Mon Jun 19 10:54:40 2006 +*************** +*** 564,570 **** +--- 564,574 ---- + */ + if (p_lpl) + { ++ # ifdef VMS /* Somehow VMS doesn't handle the "**". */ ++ source_runtime((char_u *)"plugin/*.vim", TRUE); ++ # else + source_runtime((char_u *)"plugin/**/*.vim", TRUE); ++ # endif + TIME_MSG("loading plugins"); + } + #endif +*** ../vim-7.0.017/src/version.c Sat May 13 17:26:10 2006 +--- src/version.c Mon Jun 19 10:55:29 2006 +*************** +*** 668,669 **** +--- 668,671 ---- + { /* Add new patch number below this line */ ++ /**/ ++ 18, + /**/ + +-- +BLACK KNIGHT: Come on you pansy! + [hah] [parry thrust] + [ARTHUR chops the BLACK KNIGHT's right arm off] +ARTHUR: Victory is mine! [kneeling] + We thank thee Lord, that in thy merc- + [Black Knight kicks Arthur in the head while he is praying] + The Quest for the Holy Grail (Monty Python) + + /// Bram Moolenaar -- Bram@Moolenaar.net -- http://www.Moolenaar.net \\\ +/// sponsor Vim, vote for features -- http://www.Vim.org/sponsor/ \\\ +\\\ download, build and distribute -- http://www.A-A-P.org /// + \\\ help me help AIDS victims -- http://ICCF-Holland.org /// --- vim-7.0.orig/upstream/patches/7.0.062 +++ vim-7.0/upstream/patches/7.0.062 @@ -0,0 +1,120 @@ +To: vim-dev@vim.org +Subject: Patch 7.0.062 +Fcc: outbox +From: Bram Moolenaar +Mime-Version: 1.0 +Content-Type: text/plain; charset=ISO-8859-1 +Content-Transfer-Encoding: 8bit +------------ + +Patch 7.0.062 +Problem: Mac: Crash when using the popup menu for spell correction. The + popup menu appears twice when letting go of the right mouse button + early. +Solution: Don't show the popup menu on the release of the right mouse + button. Also check that a menu pointer is actually valid. +Files: src/proto/menu.pro, src/menu.c, src/normal.c, src/term.c + + +*** ../vim-7.0.061/src/proto/menu.pro Fri Mar 24 23:37:59 2006 +--- src/proto/menu.pro Wed Aug 16 20:25:57 2006 +*************** +*** 10,15 **** +--- 10,16 ---- + extern int menu_is_child_of_popup __ARGS((vimmenu_T *menu)); + extern int menu_is_toolbar __ARGS((char_u *name)); + extern int menu_is_separator __ARGS((char_u *name)); ++ extern int check_menu_pointer __ARGS((vimmenu_T *root, vimmenu_T *menu_to_check)); + extern void gui_create_initial_menus __ARGS((vimmenu_T *menu)); + extern void gui_update_menus __ARGS((int modes)); + extern int gui_is_menu_shortcut __ARGS((int key)); +*** ../vim-7.0.061/src/menu.c Wed Aug 16 15:56:58 2006 +--- src/menu.c Wed Aug 16 20:35:09 2006 +*************** +*** 1778,1783 **** +--- 1778,1804 ---- + } + + /* ++ * Check that a pointer appears in the menu tree. Used to protect from using ++ * a menu that was deleted after it was selected but before the event was ++ * handled. ++ * Return OK or FAIL. Used recursively. ++ */ ++ int ++ check_menu_pointer(root, menu_to_check) ++ vimmenu_T *root; ++ vimmenu_T *menu_to_check; ++ { ++ vimmenu_T *p; ++ ++ for (p = root; p != NULL; p = p->next) ++ if (p == menu_to_check ++ || (p->children != NULL ++ && check_menu_pointer(p->children, menu_to_check) == OK)) ++ return OK; ++ return FAIL; ++ } ++ ++ /* + * After we have started the GUI, then we can create any menus that have been + * defined. This is done once here. add_menu_path() may have already been + * called to define these menus, and may be called again. This function calls +*** ../vim-7.0.061/src/normal.c Sat Apr 29 23:53:55 2006 +--- src/normal.c Wed Aug 16 19:54:04 2006 +*************** +*** 2504,2510 **** + * NOTE: Ignore right button down and drag mouse events. + * Windows only shows the popup menu on the button up event. + */ +! #if defined(FEAT_GUI_MOTIF) || defined(FEAT_GUI_GTK) || defined(FEAT_GUI_PHOTON) + if (!is_click) + return FALSE; + #endif +--- 2504,2511 ---- + * NOTE: Ignore right button down and drag mouse events. + * Windows only shows the popup menu on the button up event. + */ +! #if defined(FEAT_GUI_MOTIF) || defined(FEAT_GUI_GTK) \ +! || defined(FEAT_GUI_PHOTON) || defined(FEAT_GUI_MAC) + if (!is_click) + return FALSE; + #endif +*** ../vim-7.0.061/src/term.c Wed May 3 23:26:49 2006 +--- src/term.c Wed Aug 16 21:24:21 2006 +*************** +*** 4783,4788 **** +--- 4783,4796 ---- + return -1; + current_menu = (vimmenu_T *)val; + slen += num_bytes; ++ ++ /* The menu may have been deleted right after it was used, check ++ * for that. */ ++ if (check_menu_pointer(root_menu, current_menu) == FAIL) ++ { ++ key_name[0] = KS_EXTRA; ++ key_name[1] = (int)KE_IGNORE; ++ } + } + # endif + # ifdef FEAT_GUI_TABLINE +*** ../vim-7.0.061/src/version.c Wed Aug 16 21:26:19 2006 +--- src/version.c Wed Aug 16 21:40:37 2006 +*************** +*** 668,669 **** +--- 668,671 ---- + { /* Add new patch number below this line */ ++ /**/ ++ 62, + /**/ + +-- +hundred-and-one symptoms of being an internet addict: +166. You have been on your computer soo long that you didn't realize + you had grandchildren. + + /// Bram Moolenaar -- Bram@Moolenaar.net -- http://www.Moolenaar.net \\\ +/// sponsor Vim, vote for features -- http://www.Vim.org/sponsor/ \\\ +\\\ download, build and distribute -- http://www.A-A-P.org /// + \\\ help me help AIDS victims -- http://ICCF-Holland.org /// --- vim-7.0.orig/upstream/patches/7.0.038 +++ vim-7.0/upstream/patches/7.0.038 @@ -0,0 +1,95 @@ +To: vim-dev@vim.org +Subject: Patch 7.0.038 +Fcc: outbox +From: Bram Moolenaar +Mime-Version: 1.0 +Content-Type: text/plain; charset=ISO-8859-1 +Content-Transfer-Encoding: 8bit +------------ + +Patch 7.0.038 +Problem: When calling complete() from an Insert mode expression mapping + text could be inserted in an improper way. +Solution: Make undo_allowed() global and use it in complete(). +Files: src/undo.c, src/proto/undo.pro, src/eval.c + + +*** ../vim-7.0.037/src/undo.c Sat Apr 22 00:01:05 2006 +--- src/undo.c Mon Jul 3 22:23:22 2006 +*************** +*** 84,90 **** + static void u_unch_branch __ARGS((u_header_T *uhp)); + static u_entry_T *u_get_headentry __ARGS((void)); + static void u_getbot __ARGS((void)); +- static int undo_allowed __ARGS((void)); + static int u_savecommon __ARGS((linenr_T, linenr_T, linenr_T)); + static void u_doit __ARGS((int count)); + static void u_undoredo __ARGS((int undo)); +--- 84,89 ---- +*************** +*** 196,202 **** + * Return TRUE when undo is allowed. Otherwise give an error message and + * return FALSE. + */ +! static int + undo_allowed() + { + /* Don't allow changes when 'modifiable' is off. */ +--- 195,201 ---- + * Return TRUE when undo is allowed. Otherwise give an error message and + * return FALSE. + */ +! int + undo_allowed() + { + /* Don't allow changes when 'modifiable' is off. */ +*** ../vim-7.0.037/src/proto/undo.pro Mon Apr 10 16:38:50 2006 +--- src/proto/undo.pro Mon Jul 3 22:25:07 2006 +*************** +*** 4,9 **** +--- 4,10 ---- + extern int u_savesub __ARGS((linenr_T lnum)); + extern int u_inssub __ARGS((linenr_T lnum)); + extern int u_savedel __ARGS((linenr_T lnum, long nlines)); ++ extern int undo_allowed __ARGS((void)); + extern void u_undo __ARGS((int count)); + extern void u_redo __ARGS((int count)); + extern void undo_time __ARGS((long step, int sec, int absolute)); +*** ../vim-7.0.037/src/eval.c Thu Jun 22 21:01:19 2006 +--- src/eval.c Mon Jul 10 23:03:13 2006 +*************** +*** 8252,8257 **** +--- 8252,8263 ---- + EMSG(_("E785: complete() can only be used in Insert mode")); + return; + } ++ ++ /* Check for undo allowed here, because if something was already inserted ++ * the line was already saved for undo and this check isn't done. */ ++ if (!undo_allowed()) ++ return; ++ + if (argvars[1].v_type != VAR_LIST || argvars[1].vval.v_list == NULL) + { + EMSG(_(e_invarg)); +*** ../vim-7.0.037/src/version.c Tue Jul 11 22:59:04 2006 +--- src/version.c Wed Jul 12 20:31:49 2006 +*************** +*** 668,669 **** +--- 668,671 ---- + { /* Add new patch number below this line */ ++ /**/ ++ 38, + /**/ + +-- +If someone questions your market projections, simply point out that your +target market is "People who are nuts" and "People who will buy any damn +thing". Nobody is going to tell you there aren't enough of those people +to go around. + (Scott Adams - The Dilbert principle) + + /// Bram Moolenaar -- Bram@Moolenaar.net -- http://www.Moolenaar.net \\\ +/// sponsor Vim, vote for features -- http://www.Vim.org/sponsor/ \\\ +\\\ download, build and distribute -- http://www.A-A-P.org /// + \\\ help me help AIDS victims -- http://ICCF-Holland.org /// --- vim-7.0.orig/upstream/patches/7.0.043 +++ vim-7.0/upstream/patches/7.0.043 @@ -0,0 +1,52 @@ +To: vim-dev@vim.org +Subject: Patch 7.0.043 +Fcc: outbox +From: Bram Moolenaar +Mime-Version: 1.0 +Content-Type: text/plain; charset=ISO-8859-1 +Content-Transfer-Encoding: 8bit +------------ + +Patch 7.0.043 +Problem: Using "%!" at the start of 'statusline' doesn't work. +Solution: Recognize the special item when the option is being set. +Files: src/option.c + + +*** ../vim-7.0.042/src/option.c Sat May 13 14:41:15 2006 +--- src/option.c Mon Jul 10 22:41:20 2006 +*************** +*** 6325,6331 **** + else + errmsg = check_stl_option(p_ruf); + } +! else + errmsg = check_stl_option(s); + if (varp == &p_ruf && errmsg == NULL) + comp_col(); +--- 6325,6332 ---- + else + errmsg = check_stl_option(p_ruf); + } +! /* check 'statusline' only if it doesn't start with "%!" */ +! else if (varp != &p_stl || s[0] != '%' || s[1] != '!') + errmsg = check_stl_option(s); + if (varp == &p_ruf && errmsg == NULL) + comp_col(); +*** ../vim-7.0.042/src/version.c Sun Jul 23 22:37:29 2006 +--- src/version.c Tue Aug 8 16:29:24 2006 +*************** +*** 668,669 **** +--- 668,671 ---- + { /* Add new patch number below this line */ ++ /**/ ++ 43, + /**/ + +-- +There's no place like $(HOME)! + + /// Bram Moolenaar -- Bram@Moolenaar.net -- http://www.Moolenaar.net \\\ +/// sponsor Vim, vote for features -- http://www.Vim.org/sponsor/ \\\ +\\\ download, build and distribute -- http://www.A-A-P.org /// + \\\ help me help AIDS victims -- http://ICCF-Holland.org /// --- vim-7.0.orig/upstream/patches/7.0.042 +++ vim-7.0/upstream/patches/7.0.042 @@ -0,0 +1,54 @@ +To: vim-dev@vim.org +Subject: Patch 7.0.042 +Fcc: outbox +From: Bram Moolenaar +Mime-Version: 1.0 +Content-Type: text/plain; charset=ISO-8859-1 +Content-Transfer-Encoding: 8bit +------------ + +Patch 7.0.042 +Problem: When pasting a block of text in Insert mode Vim hangs or crashes. + (Noam Halevy) +Solution: Avoid that the cursor is positioned past the NUL of a line. +Files: src/ops.c + + +*** ../vim-7.0.041/src/ops.c Tue Jun 20 20:29:13 2006 +--- src/ops.c Sun Jul 23 22:36:39 2006 +*************** +*** 3493,3500 **** +--- 3493,3507 ---- + # endif + if (flags & PUT_CURSEND) + { ++ colnr_T len; ++ + curwin->w_cursor = curbuf->b_op_end; + curwin->w_cursor.col++; ++ ++ /* in Insert mode we might be after the NUL, correct for that */ ++ len = (colnr_T)STRLEN(ml_get_curline()); ++ if (curwin->w_cursor.col > len) ++ curwin->w_cursor.col = len; + } + else + curwin->w_cursor.lnum = lnum; +*** ../vim-7.0.041/src/version.c Sun Jul 23 22:07:55 2006 +--- src/version.c Sun Jul 23 22:35:13 2006 +*************** +*** 668,669 **** +--- 668,671 ---- + { /* Add new patch number below this line */ ++ /**/ ++ 42, + /**/ + +-- +hundred-and-one symptoms of being an internet addict: +45. You buy a Captain Kirk chair with a built-in keyboard and mouse. + + /// Bram Moolenaar -- Bram@Moolenaar.net -- http://www.Moolenaar.net \\\ +/// sponsor Vim, vote for features -- http://www.Vim.org/sponsor/ \\\ +\\\ download, build and distribute -- http://www.A-A-P.org /// + \\\ help me help AIDS victims -- http://ICCF-Holland.org /// --- vim-7.0.orig/upstream/patches/7.0.098 +++ vim-7.0/upstream/patches/7.0.098 @@ -0,0 +1,71 @@ +To: vim-dev@vim.org +Subject: Patch 7.0.098 +Fcc: outbox +From: Bram Moolenaar +Mime-Version: 1.0 +Content-Type: text/plain; charset=ISO-8859-1 +Content-Transfer-Encoding: 8bit +------------ + +Patch 7.0.098 +Problem: Redirecting command output in a cmdline completion function + doesn't work. (Hari Krishna Dara) +Solution: Enable redirection when redirection is started. +Files: src/ex_docmd.c, src/ex_getln.c + + +*** ../vim-7.0.097/src/ex_docmd.c Sun Sep 10 15:50:32 2006 +--- src/ex_docmd.c Sun Sep 10 20:59:46 2006 +*************** +*** 8422,8427 **** +--- 8422,8436 ---- + else + EMSG2(_(e_invarg2), eap->arg); + } ++ ++ /* Make sure redirection is not off. Can happen for cmdline completion ++ * that indirectly invokes a command to catch its output. */ ++ if (redir_fd != NULL ++ #ifdef FEAT_EVAL ++ || redir_reg || redir_vname ++ #endif ++ ) ++ redir_off = FALSE; + } + + /* +*** ../vim-7.0.097/src/ex_getln.c Sat Sep 2 17:58:36 2006 +--- src/ex_getln.c Sun Sep 10 21:04:57 2006 +*************** +*** 324,329 **** +--- 324,332 ---- + */ + for (;;) + { ++ redir_off = TRUE; /* Don't redirect the typed command. ++ Repeated, because a ":redir" inside ++ completion may switch it on. */ + #ifdef USE_ON_FLY_SCROLL + dont_scroll = FALSE; /* allow scrolling here */ + #endif +*** ../vim-7.0.097/src/version.c Sun Sep 10 15:50:32 2006 +--- src/version.c Sun Sep 10 20:58:17 2006 +*************** +*** 668,669 **** +--- 668,671 ---- + { /* Add new patch number below this line */ ++ /**/ ++ 98, + /**/ + +-- +GUEST: He's killed the best man! +SECOND GUEST: (holding a limp WOMAN) He's killed my auntie. +FATHER: No, please! This is supposed to be a happy occasion! Let's + not bicker and argue about who killed who ... + "Monty Python and the Holy Grail" PYTHON (MONTY) PICTURES LTD + + /// Bram Moolenaar -- Bram@Moolenaar.net -- http://www.Moolenaar.net \\\ +/// sponsor Vim, vote for features -- http://www.Vim.org/sponsor/ \\\ +\\\ download, build and distribute -- http://www.A-A-P.org /// + \\\ help me help AIDS victims -- http://ICCF-Holland.org /// --- vim-7.0.orig/upstream/patches/7.0.140 +++ vim-7.0/upstream/patches/7.0.140 @@ -0,0 +1,82 @@ +To: vim-dev@vim.org +Subject: Patch 7.0.140 +Fcc: outbox +From: Bram Moolenaar +Mime-Version: 1.0 +Content-Type: text/plain; charset=ISO-8859-1 +Content-Transfer-Encoding: 8bit +------------ + +Patch 7.0.140 (after 7.0.134) +Problem: Comparing recursively looped List or Dictionary doesn't work well. +Solution: Detect comparing a List or Dictionary with itself. +Files: src/eval.c + + +*** ../vim-7.0.139/src/eval.c Sun Oct 15 22:38:41 2006 +--- src/eval.c Sun Oct 15 22:30:09 2006 +*************** +*** 5451,5456 **** +--- 5451,5458 ---- + { + listitem_T *item1, *item2; + ++ if (l1 == l2) ++ return TRUE; + if (list_len(l1) != list_len(l2)) + return FALSE; + +*************** +*** 5487,5492 **** +--- 5489,5496 ---- + dictitem_T *item2; + int todo; + ++ if (d1 == d2) ++ return TRUE; + if (dict_len(d1) != dict_len(d2)) + return FALSE; + +*************** +*** 5522,5531 **** + static int recursive = 0; /* cach recursive loops */ + int r; + +! /* Catch lists and dicts that have an endless loop by limiting +! * recursiveness to 1000. */ +! if (tv1->v_type != tv2->v_type || recursive >= 1000) + return FALSE; + + switch (tv1->v_type) + { +--- 5526,5537 ---- + static int recursive = 0; /* cach recursive loops */ + int r; + +! if (tv1->v_type != tv2->v_type) + return FALSE; ++ /* Catch lists and dicts that have an endless loop by limiting ++ * recursiveness to 1000. We guess they are equal then. */ ++ if (recursive >= 1000) ++ return TRUE; + + switch (tv1->v_type) + { +*** ../vim-7.0.139/src/version.c Tue Oct 17 13:39:36 2006 +--- src/version.c Tue Oct 17 15:15:04 2006 +*************** +*** 668,669 **** +--- 668,671 ---- + { /* Add new patch number below this line */ ++ /**/ ++ 140, + /**/ + +-- +hundred-and-one symptoms of being an internet addict: +54. You start tilting your head sideways to smile. :-) + + /// Bram Moolenaar -- Bram@Moolenaar.net -- http://www.Moolenaar.net \\\ +/// sponsor Vim, vote for features -- http://www.Vim.org/sponsor/ \\\ +\\\ download, build and distribute -- http://www.A-A-P.org /// + \\\ help me help AIDS victims -- http://ICCF-Holland.org /// --- vim-7.0.orig/upstream/patches/7.0.155 +++ vim-7.0/upstream/patches/7.0.155 @@ -0,0 +1,196 @@ +To: vim-dev@vim.org +Subject: Patch 7.0.155 +Fcc: outbox +From: Bram Moolenaar +Mime-Version: 1.0 +Content-Type: text/plain; charset=ISO-8859-1 +Content-Transfer-Encoding: 8bit +------------ + +Patch 7.0.155 +Problem: When getchar() returns a mouse button click there is no way to get + the mouse coordinates. +Solution: Add v:mouse_win, v:mouse_lnum and v:mouse_col. +Files: runtime/doc/eval.txt, src/eval.c, src/vim.h + + +*** ../vim-7.0.154/runtime/doc/eval.txt Tue Oct 3 14:43:31 2006 +--- runtime/doc/eval.txt Wed Nov 1 15:20:42 2006 +*************** +*** 1,4 **** +! *eval.txt* For Vim version 7.0. Last change: 2006 Sep 22 + + + VIM REFERENCE MANUAL by Bram Moolenaar +--- 1,4 ---- +! *eval.txt* For Vim version 7.0. Last change: 2006 Nov 01 + + + VIM REFERENCE MANUAL by Bram Moolenaar +*************** +*** 1374,1379 **** +--- 1380,1400 ---- + 'guitabtooltip'. Only valid while one of these expressions is + being evaluated. Read-only when in the |sandbox|. + ++ *v:mouse_win* *mouse_win-variable* ++ v:mouse_win Window number for a mouse click obtained with |getchar()|. ++ First window has number 1, like with |winnr()|. The value is ++ zero when there was no mouse button click. ++ ++ *v:mouse_lnum* *mouse_lnum-variable* ++ v:mouse_lnum Line number for a mouse click obtained with |getchar()|. ++ This is the text line number, not the screen line number. The ++ value is zero when there was no mouse button click. ++ ++ *v:mouse_col* *mouse_col-variable* ++ v:mouse_col Column number for a mouse click obtained with |getchar()|. ++ This is the screen column number, like with |virtcol()|. The ++ value is zero when there was no mouse button click. ++ + *v:prevcount* *prevcount-variable* + v:prevcount The count given for the last but one Normal mode command. + This is the v:count value of the previous command. Useful if +*************** +*** 2702,2707 **** +--- 2728,2744 ---- + one-byte character it is the character itself as a number. + Use nr2char() to convert it to a String. + ++ When the user clicks a mouse button, the mouse event will be ++ returned. The position can then be found in |v:mouse_col|, ++ |v:mouse_lnum| and |v:mouse_win|. This example positions the ++ mouse as it would normally happen: > ++ let c = getchar() ++ if c == "\" && v:mouse_win > 0 ++ exe v:mouse_win . "wincmd w" ++ exe v:mouse_lnum ++ exe "normal " . v:mouse_col . "|" ++ endif ++ < + There is no prompt, you will somehow have to make clear to the + user that a character has to be typed. + There is no mapping for the character. +*** ../vim-7.0.154/src/eval.c Tue Oct 24 13:51:47 2006 +--- src/eval.c Wed Nov 1 13:39:52 2006 +*************** +*** 343,348 **** +--- 342,350 ---- + {VV_NAME("swapchoice", VAR_STRING), 0}, + {VV_NAME("swapcommand", VAR_STRING), VV_RO}, + {VV_NAME("char", VAR_STRING), VV_RO}, ++ {VV_NAME("mouse_win", VAR_NUMBER), 0}, ++ {VV_NAME("mouse_lnum", VAR_NUMBER), 0}, ++ {VV_NAME("mouse_col", VAR_NUMBER), 0}, + }; + + /* shorthand */ +*************** +*** 9855,9860 **** +--- 9857,9866 ---- + --no_mapping; + --allow_keys; + ++ vimvars[VV_MOUSE_WIN].vv_nr = 0; ++ vimvars[VV_MOUSE_LNUM].vv_nr = 0; ++ vimvars[VV_MOUSE_COL].vv_nr = 0; ++ + rettv->vval.v_number = n; + if (IS_SPECIAL(n) || mod_mask != 0) + { +*************** +*** 9883,9888 **** +--- 9889,9941 ---- + temp[i++] = NUL; + rettv->v_type = VAR_STRING; + rettv->vval.v_string = vim_strsave(temp); ++ ++ #ifdef FEAT_MOUSE ++ if (n == K_LEFTMOUSE ++ || n == K_LEFTMOUSE_NM ++ || n == K_LEFTDRAG ++ || n == K_LEFTRELEASE ++ || n == K_LEFTRELEASE_NM ++ || n == K_MIDDLEMOUSE ++ || n == K_MIDDLEDRAG ++ || n == K_MIDDLERELEASE ++ || n == K_RIGHTMOUSE ++ || n == K_RIGHTDRAG ++ || n == K_RIGHTRELEASE ++ || n == K_X1MOUSE ++ || n == K_X1DRAG ++ || n == K_X1RELEASE ++ || n == K_X2MOUSE ++ || n == K_X2DRAG ++ || n == K_X2RELEASE ++ || n == K_MOUSEDOWN ++ || n == K_MOUSEUP) ++ { ++ int row = mouse_row; ++ int col = mouse_col; ++ win_T *win; ++ linenr_T lnum; ++ # ifdef FEAT_WINDOWS ++ win_T *wp; ++ # endif ++ int n = 1; ++ ++ if (row >= 0 && col >= 0) ++ { ++ /* Find the window at the mouse coordinates and compute the ++ * text position. */ ++ win = mouse_find_win(&row, &col); ++ (void)mouse_comp_pos(win, &row, &col, &lnum); ++ # ifdef FEAT_WINDOWS ++ for (wp = firstwin; wp != win; wp = wp->w_next) ++ ++n; ++ # endif ++ vimvars[VV_MOUSE_WIN].vv_nr = n; ++ vimvars[VV_MOUSE_LNUM].vv_nr = lnum; ++ vimvars[VV_MOUSE_COL].vv_nr = col + 1; ++ } ++ } ++ #endif + } + } + +*** ../vim-7.0.154/src/vim.h Tue Aug 29 18:16:37 2006 +--- src/vim.h Wed Nov 1 13:11:16 2006 +*************** +*** 1669,1675 **** + #define VV_SWAPCHOICE 46 + #define VV_SWAPCOMMAND 47 + #define VV_CHAR 48 +! #define VV_LEN 49 /* number of v: vars */ + + #ifdef FEAT_CLIPBOARD + +--- 1669,1678 ---- + #define VV_SWAPCHOICE 46 + #define VV_SWAPCOMMAND 47 + #define VV_CHAR 48 +! #define VV_MOUSE_WIN 49 +! #define VV_MOUSE_LNUM 50 +! #define VV_MOUSE_COL 51 +! #define VV_LEN 52 /* number of v: vars */ + + #ifdef FEAT_CLIPBOARD + +*** ../vim-7.0.154/src/version.c Wed Nov 1 12:43:07 2006 +--- src/version.c Wed Nov 1 15:22:33 2006 +*************** +*** 668,669 **** +--- 668,671 ---- + { /* Add new patch number below this line */ ++ /**/ ++ 155, + /**/ + +-- +hundred-and-one symptoms of being an internet addict: +138. You develop a liking for cold coffee. + + /// Bram Moolenaar -- Bram@Moolenaar.net -- http://www.Moolenaar.net \\\ +/// sponsor Vim, vote for features -- http://www.Vim.org/sponsor/ \\\ +\\\ download, build and distribute -- http://www.A-A-P.org /// + \\\ help me help AIDS victims -- http://ICCF-Holland.org /// --- vim-7.0.orig/upstream/patches/7.0.114 +++ vim-7.0/upstream/patches/7.0.114 @@ -0,0 +1,64 @@ +To: vim-dev@vim.org +Subject: Patch 7.0.114 +Fcc: outbox +From: Bram Moolenaar +Mime-Version: 1.0 +Content-Type: text/plain; charset=ISO-8859-1 +Content-Transfer-Encoding: 8bit +------------ + +Patch 7.0.114 +Problem: When aborting an insert with CTRL-C an extra undo point is + created in the GUI. (Yukihiro Nakadaira) +Solution: Call gotchars() only when advancing. +Files: src/getchar.c + + +*** ../vim-7.0.113/src/getchar.c Tue Sep 5 12:57:14 2006 +--- src/getchar.c Tue Sep 26 17:44:45 2006 +*************** +*** 1960,1969 **** + c = Ctrl_C; + flush_buffers(TRUE); /* flush all typeahead */ + +! /* Also record this character, it might be needed to +! * get out of Insert mode. */ +! *typebuf.tb_buf = c; +! gotchars(typebuf.tb_buf, 1); + cmd_silent = FALSE; + + break; +--- 1962,1974 ---- + c = Ctrl_C; + flush_buffers(TRUE); /* flush all typeahead */ + +! if (advance) +! { +! /* Also record this character, it might be needed to +! * get out of Insert mode. */ +! *typebuf.tb_buf = c; +! gotchars(typebuf.tb_buf, 1); +! } + cmd_silent = FALSE; + + break; +*** ../vim-7.0.113/src/version.c Tue Oct 3 15:22:00 2006 +--- src/version.c Tue Oct 3 15:34:14 2006 +*************** +*** 668,669 **** +--- 668,671 ---- + { /* Add new patch number below this line */ ++ /**/ ++ 114, + /**/ + +-- +Sometimes you can protect millions of dollars in your budget simply by buying +a bag of cookies, dropping it on the budget anylyst's desk, and saying +something deeply personal such as "How was your weekend, big guy?" + (Scott Adams - The Dilbert principle) + + /// Bram Moolenaar -- Bram@Moolenaar.net -- http://www.Moolenaar.net \\\ +/// sponsor Vim, vote for features -- http://www.Vim.org/sponsor/ \\\ +\\\ download, build and distribute -- http://www.A-A-P.org /// + \\\ help me help AIDS victims -- http://ICCF-Holland.org /// --- vim-7.0.orig/upstream/patches/7.0.135 +++ vim-7.0/upstream/patches/7.0.135 @@ -0,0 +1,362 @@ +To: vim-dev@vim.org +Subject: Patch 7.0.135 +Fcc: outbox +From: Bram Moolenaar +Mime-Version: 1.0 +Content-Type: text/plain; charset=ISO-8859-1 +Content-Transfer-Encoding: 8bit +------------ + +Patch 7.0.135 +Problem: Crash when garbage collecting list or dict with loop. +Solution: Don't use DEL_REFCOUNT but don't recurse into Lists and + Dictionaries when freeing them in the garbage collector. + Also add allocated Dictionaries to the list of Dictionaries to + avoid leaking memory. +Files: src/eval.c, src/proto/eval.pro, src/tag.c + + +*** ../vim-7.0.134/src/eval.c Sun Oct 15 15:10:08 2006 +--- src/eval.c Sun Oct 15 22:30:09 2006 +*************** +*** 191,198 **** + #define FC_RANGE 2 /* function accepts range */ + #define FC_DICT 4 /* Dict function, uses "self" */ + +- #define DEL_REFCOUNT 999999 /* list/dict is being deleted */ +- + /* + * All user-defined functions are found in this hashtable. + */ +--- 191,196 ---- +*************** +*** 435,441 **** + static void set_ref_in_list __ARGS((list_T *l, int copyID)); + static void set_ref_in_item __ARGS((typval_T *tv, int copyID)); + static void dict_unref __ARGS((dict_T *d)); +! static void dict_free __ARGS((dict_T *d)); + static dictitem_T *dictitem_alloc __ARGS((char_u *key)); + static dictitem_T *dictitem_copy __ARGS((dictitem_T *org)); + static void dictitem_remove __ARGS((dict_T *dict, dictitem_T *item)); +--- 433,439 ---- + static void set_ref_in_list __ARGS((list_T *l, int copyID)); + static void set_ref_in_item __ARGS((typval_T *tv, int copyID)); + static void dict_unref __ARGS((dict_T *d)); +! static void dict_free __ARGS((dict_T *d, int recurse)); + static dictitem_T *dictitem_alloc __ARGS((char_u *key)); + static dictitem_T *dictitem_copy __ARGS((dictitem_T *org)); + static void dictitem_remove __ARGS((dict_T *dict, dictitem_T *item)); +*************** +*** 4899,4905 **** + { + if (list_append_tv(l, &item->li_tv) == FAIL) + { +! list_free(l); + return FAIL; + } + item = item->li_next; +--- 4897,4903 ---- + { + if (list_append_tv(l, &item->li_tv) == FAIL) + { +! list_free(l, TRUE); + return FAIL; + } + item = item->li_next; +*************** +*** 5299,5305 **** + EMSG2(_("E697: Missing end of List ']': %s"), *arg); + failret: + if (evaluate) +! list_free(l); + return FAIL; + } + +--- 5297,5303 ---- + EMSG2(_("E697: Missing end of List ']': %s"), *arg); + failret: + if (evaluate) +! list_free(l, TRUE); + return FAIL; + } + +*************** +*** 5363,5370 **** + list_unref(l) + list_T *l; + { +! if (l != NULL && l->lv_refcount != DEL_REFCOUNT && --l->lv_refcount <= 0) +! list_free(l); + } + + /* +--- 5361,5368 ---- + list_unref(l) + list_T *l; + { +! if (l != NULL && --l->lv_refcount <= 0) +! list_free(l, TRUE); + } + + /* +*************** +*** 5372,5385 **** + * Ignores the reference count. + */ + void +! list_free(l) +! list_T *l; + { + listitem_T *item; + +- /* Avoid that recursive reference to the list frees us again. */ +- l->lv_refcount = DEL_REFCOUNT; +- + /* Remove the list from the list of lists for garbage collection. */ + if (l->lv_used_prev == NULL) + first_list = l->lv_used_next; +--- 5370,5381 ---- + * Ignores the reference count. + */ + void +! list_free(l, recurse) +! list_T *l; +! int recurse; /* Free Lists and Dictionaries recursively. */ + { + listitem_T *item; + + /* Remove the list from the list of lists for garbage collection. */ + if (l->lv_used_prev == NULL) + first_list = l->lv_used_next; +*************** +*** 5392,5398 **** + { + /* Remove the item before deleting it. */ + l->lv_first = item->li_next; +! listitem_free(item); + } + vim_free(l); + } +--- 5388,5397 ---- + { + /* Remove the item before deleting it. */ + l->lv_first = item->li_next; +! if (recurse || (item->li_tv.v_type != VAR_LIST +! && item->li_tv.v_type != VAR_DICT)) +! clear_tv(&item->li_tv); +! vim_free(item); + } + vim_free(l); + } +*************** +*** 6113,6119 **** + for (dd = first_dict; dd != NULL; ) + if (dd->dv_copyID != copyID) + { +! dict_free(dd); + did_free = TRUE; + + /* restart, next dict may also have been freed */ +--- 6118,6127 ---- + for (dd = first_dict; dd != NULL; ) + if (dd->dv_copyID != copyID) + { +! /* Free the Dictionary and ordinary items it contains, but don't +! * recurse into Lists and Dictionaries, they will be in the list +! * of dicts or list of lists. */ +! dict_free(dd, FALSE); + did_free = TRUE; + + /* restart, next dict may also have been freed */ +*************** +*** 6130,6136 **** + for (ll = first_list; ll != NULL; ) + if (ll->lv_copyID != copyID && ll->lv_watch == NULL) + { +! list_free(ll); + did_free = TRUE; + + /* restart, next list may also have been freed */ +--- 6138,6147 ---- + for (ll = first_list; ll != NULL; ) + if (ll->lv_copyID != copyID && ll->lv_watch == NULL) + { +! /* Free the List and ordinary items it contains, but don't recurse +! * into Lists and Dictionaries, they will be in the list of dicts +! * or list of lists. */ +! list_free(ll, FALSE); + did_free = TRUE; + + /* restart, next list may also have been freed */ +*************** +*** 6223,6233 **** + d = (dict_T *)alloc(sizeof(dict_T)); + if (d != NULL) + { +! /* Add the list to the hashtable for garbage collection. */ + if (first_dict != NULL) + first_dict->dv_used_prev = d; + d->dv_used_next = first_dict; + d->dv_used_prev = NULL; + + hash_init(&d->dv_hashtab); + d->dv_lock = 0; +--- 6234,6245 ---- + d = (dict_T *)alloc(sizeof(dict_T)); + if (d != NULL) + { +! /* Add the list to the list of dicts for garbage collection. */ + if (first_dict != NULL) + first_dict->dv_used_prev = d; + d->dv_used_next = first_dict; + d->dv_used_prev = NULL; ++ first_dict = d; + + hash_init(&d->dv_hashtab); + d->dv_lock = 0; +*************** +*** 6245,6252 **** + dict_unref(d) + dict_T *d; + { +! if (d != NULL && d->dv_refcount != DEL_REFCOUNT && --d->dv_refcount <= 0) +! dict_free(d); + } + + /* +--- 6257,6264 ---- + dict_unref(d) + dict_T *d; + { +! if (d != NULL && --d->dv_refcount <= 0) +! dict_free(d, TRUE); + } + + /* +*************** +*** 6254,6269 **** + * Ignores the reference count. + */ + static void +! dict_free(d) +! dict_T *d; + { + int todo; + hashitem_T *hi; + dictitem_T *di; + +- /* Avoid that recursive reference to the dict frees us again. */ +- d->dv_refcount = DEL_REFCOUNT; +- + /* Remove the dict from the list of dicts for garbage collection. */ + if (d->dv_used_prev == NULL) + first_dict = d->dv_used_next; +--- 6266,6279 ---- + * Ignores the reference count. + */ + static void +! dict_free(d, recurse) +! dict_T *d; +! int recurse; /* Free Lists and Dictionaries recursively. */ + { + int todo; + hashitem_T *hi; + dictitem_T *di; + + /* Remove the dict from the list of dicts for garbage collection. */ + if (d->dv_used_prev == NULL) + first_dict = d->dv_used_next; +*************** +*** 6283,6289 **** + * something recursive causing trouble. */ + di = HI2DI(hi); + hash_remove(&d->dv_hashtab, hi); +! dictitem_free(di); + --todo; + } + } +--- 6293,6302 ---- + * something recursive causing trouble. */ + di = HI2DI(hi); + hash_remove(&d->dv_hashtab, hi); +! if (recurse || (di->di_tv.v_type != VAR_LIST +! && di->di_tv.v_type != VAR_DICT)) +! clear_tv(&di->di_tv); +! vim_free(di); + --todo; + } + } +*************** +*** 6734,6740 **** + EMSG2(_("E723: Missing end of Dictionary '}': %s"), *arg); + failret: + if (evaluate) +! dict_free(d); + return FAIL; + } + +--- 6747,6753 ---- + EMSG2(_("E723: Missing end of Dictionary '}': %s"), *arg); + failret: + if (evaluate) +! dict_free(d, TRUE); + return FAIL; + } + +*** ../vim-7.0.134/src/proto/eval.pro Fri Mar 24 23:16:28 2006 +--- src/proto/eval.pro Sun Oct 15 22:08:11 2006 +*************** +*** 44,50 **** + extern char_u *get_user_var_name __ARGS((expand_T *xp, int idx)); + extern list_T *list_alloc __ARGS((void)); + extern void list_unref __ARGS((list_T *l)); +! extern void list_free __ARGS((list_T *l)); + extern dictitem_T *dict_lookup __ARGS((hashitem_T *hi)); + extern int list_append_dict __ARGS((list_T *list, dict_T *dict)); + extern int garbage_collect __ARGS((void)); +--- 44,50 ---- + extern char_u *get_user_var_name __ARGS((expand_T *xp, int idx)); + extern list_T *list_alloc __ARGS((void)); + extern void list_unref __ARGS((list_T *l)); +! extern void list_free __ARGS((list_T *l, int recurse)); + extern dictitem_T *dict_lookup __ARGS((hashitem_T *hi)); + extern int list_append_dict __ARGS((list_T *list, dict_T *dict)); + extern int garbage_collect __ARGS((void)); +*** ../vim-7.0.134/src/tag.c Sun Sep 10 13:56:06 2006 +--- src/tag.c Sun Oct 15 21:44:56 2006 +*************** +*** 911,917 **** + + set_errorlist(curwin, list, ' '); + +! list_free(list); + + cur_match = 0; /* Jump to the first tag */ + } +--- 911,917 ---- + + set_errorlist(curwin, list, ' '); + +! list_free(list, TRUE); + + cur_match = 0; /* Jump to the first tag */ + } +*** ../vim-7.0.134/src/version.c Sun Oct 15 15:10:08 2006 +--- src/version.c Sun Oct 15 22:01:53 2006 +*************** +*** 668,669 **** +--- 668,671 ---- + { /* Add new patch number below this line */ ++ /**/ ++ 135, + /**/ + +-- +Well, you come from nothing, you go back to nothing... What have you +lost? Nothing! + -- Monty Python: The life of Brian + + /// Bram Moolenaar -- Bram@Moolenaar.net -- http://www.Moolenaar.net \\\ +/// sponsor Vim, vote for features -- http://www.Vim.org/sponsor/ \\\ +\\\ download, build and distribute -- http://www.A-A-P.org /// + \\\ help me help AIDS victims -- http://ICCF-Holland.org /// --- vim-7.0.orig/upstream/patches/7.0.028 +++ vim-7.0/upstream/patches/7.0.028 @@ -0,0 +1,90 @@ +To: vim-dev@vim.org +Subject: Patch 7.0.028 (extra) +Fcc: outbox +From: Bram Moolenaar +Mime-Version: 1.0 +Content-Type: text/plain; charset=ISO-8859-1 +Content-Transfer-Encoding: 8bit +------------ + +Patch 7.0.028 (extra) +Problem: OS/2: Vim doesn't compile with gcc 3.2.1. +Solution: Add argument to after_pathsep(), don't define vim_handle_signal(), + define HAVE_STDARG_H. (David Sanders) +Files: src/os_unix.c, src/vim.h, src/os_os2_cfg.h + + +*** ../vim-7.0.027/src/os_unix.c Thu Jun 22 18:06:48 2006 +--- src/os_unix.c Sat Jun 17 21:00:14 2006 +*************** +*** 4971,4977 **** + if (((*file)[*num_file] = alloc(len + 2)) != NULL) + { + STRCPY((*file)[*num_file], p); +! if (!after_pathsep((*file)[*num_file] + len)) + { + (*file)[*num_file][len] = psepc; + (*file)[*num_file][len + 1] = NUL; +--- 4971,4978 ---- + if (((*file)[*num_file] = alloc(len + 2)) != NULL) + { + STRCPY((*file)[*num_file], p); +! if (!after_pathsep((*file)[*num_file], +! (*file)[*num_file] + len)) + { + (*file)[*num_file][len] = psepc; + (*file)[*num_file][len + 1] = NUL; +*** ../vim-7.0.027/src/vim.h Sun Apr 30 20:27:22 2006 +--- src/vim.h Sat Jun 17 20:59:31 2006 +*************** +*** 1983,1989 **** + /* values for vim_handle_signal() that are not a signal */ + #define SIGNAL_BLOCK -1 + #define SIGNAL_UNBLOCK -2 +! #if !defined(UNIX) && !defined(VMS) + # define vim_handle_signal(x) 0 + #endif + +--- 1983,1989 ---- + /* values for vim_handle_signal() that are not a signal */ + #define SIGNAL_BLOCK -1 + #define SIGNAL_UNBLOCK -2 +! #if !defined(UNIX) && !defined(VMS) && !defined(OS2) + # define vim_handle_signal(x) 0 + #endif + +*** ../vim-7.0.027/src/os_os2_cfg.h Sun Jun 13 18:47:02 2004 +--- src/os_os2_cfg.h Sat Jun 17 20:58:56 2006 +*************** +*** 183,188 **** +--- 183,191 ---- + /* Define if you have the ANSI C header files. */ + /* #undef STDC_HEADERS */ + ++ /* added by David Sanders */ ++ #define HAVE_STDARG_H 1 ++ + /* instead, we check a few STDC things ourselves */ + #define HAVE_STDLIB_H 1 + #undef HAVE_STRING_H /* On EMX it is better to use strings.h */ +*** ../vim-7.0.027/src/version.c Thu Jun 22 19:34:23 2006 +--- src/version.c Thu Jun 22 19:41:06 2006 +*************** +*** 668,669 **** +--- 668,671 ---- + { /* Add new patch number below this line */ ++ /**/ ++ 28, + /**/ + +-- +BRIDGEKEEPER: What is the air-speed velocity of an unladen swallow? +ARTHUR: What do you mean? An African or European swallow? +BRIDGEKEEPER: Er ... I don't know that ... Aaaaarrrrrrggghhh! + BRIDGEKEEPER is cast into the gorge. + "Monty Python and the Holy Grail" PYTHON (MONTY) PICTURES LTD + + /// Bram Moolenaar -- Bram@Moolenaar.net -- http://www.Moolenaar.net \\\ +/// sponsor Vim, vote for features -- http://www.Vim.org/sponsor/ \\\ +\\\ download, build and distribute -- http://www.A-A-P.org /// + \\\ help me help AIDS victims -- http://ICCF-Holland.org /// --- vim-7.0.orig/upstream/patches/7.0.116 +++ vim-7.0/upstream/patches/7.0.116 @@ -0,0 +1,49 @@ +To: vim-dev@vim.org +Subject: Patch 7.0.116 +Fcc: outbox +From: Bram Moolenaar +Mime-Version: 1.0 +Content-Type: text/plain; charset=ISO-8859-1 +Content-Transfer-Encoding: 8bit +------------ + +Patch 7.0.116 +Problem: 64 bit Windows version reports "32 bit" in the ":version" output. + (M. Veerman) +Solution: Change the text for Win64. +Files: src/version.c + + +*** ../vim-7.0.115/src/version.c Tue Oct 3 15:49:20 2006 +--- src/version.c Tue Oct 3 16:29:31 2006 +*************** +*** 668,669 **** +--- 668,671 ---- + { /* Add new patch number below this line */ ++ /**/ ++ 116, + /**/ +*************** +*** 962,966 **** +--- 964,972 ---- + MSG_PUTS(_("\nMS-Windows 16/32 bit GUI version")); + # else ++ # ifdef _WIN64 ++ MSG_PUTS(_("\nMS-Windows 64 bit GUI version")); ++ # else + MSG_PUTS(_("\nMS-Windows 32 bit GUI version")); ++ # endif + # endif + if (gui_is_win32s()) + +-- +Article in the first Free Software Magazine: "Bram Moolenaar studied electrical +engineering at the Technical University of Delft and graduated in 1985 on a +multi-processor Unix architecture." +Response by "dimator": Could the school not afford a proper stage for the +ceremony? + + /// Bram Moolenaar -- Bram@Moolenaar.net -- http://www.Moolenaar.net \\\ +/// sponsor Vim, vote for features -- http://www.Vim.org/sponsor/ \\\ +\\\ download, build and distribute -- http://www.A-A-P.org /// + \\\ help me help AIDS victims -- http://ICCF-Holland.org /// --- vim-7.0.orig/upstream/patches/7.0.070 +++ vim-7.0/upstream/patches/7.0.070 @@ -0,0 +1,2603 @@ +To: vim-dev@vim.org +Subject: Patch 7.0.070 +Fcc: outbox +From: Bram Moolenaar +Mime-Version: 1.0 +Content-Type: text/plain; charset=ISO-8859-1 +Content-Transfer-Encoding: 8bit +------------ + +Patch 7.0.070 +Problem: Compiler warnings for shadowed variables and uninitialized + variables. +Solution: Rename variables such as "index", "msg" and "dup". Initialize + variables. +Files: src/edit.c, src/eval.c, src/ex_cmds.c, src/ex_cmds2.c, + src/ex_docmd.c, src/gui_beval.c, src/gui_gtk.c, src/gui_gtk_x11.c, + src/hardcopy.c, src/if_cscope.c, src/main.c, src/mbyte.c, + src/memline.c, src/netbeans.c, src/normal.c, src/option.c, + src/os_unix.c, src/quickfix.c, src/regexp.c, src/screen.c, + src/search.c, src/spell.c, src/ui.c, src/undo.c, src/window.c, + src/version.c + + +*** ../vim-7.0.069/src/edit.c Tue Aug 29 16:33:23 2006 +--- src/edit.c Tue Aug 29 14:57:46 2006 +*************** +*** 129,135 **** + + static void ins_ctrl_x __ARGS((void)); + static int has_compl_option __ARGS((int dict_opt)); +! static int ins_compl_add __ARGS((char_u *str, int len, int icase, char_u *fname, char_u **cptext, int cdir, int flags, int dup)); + static int ins_compl_equal __ARGS((compl_T *match, char_u *str, int len)); + static void ins_compl_longest_match __ARGS((compl_T *match)); + static void ins_compl_add_matches __ARGS((int num_matches, char_u **matches, int icase)); +--- 129,135 ---- + + static void ins_ctrl_x __ARGS((void)); + static int has_compl_option __ARGS((int dict_opt)); +! static int ins_compl_add __ARGS((char_u *str, int len, int icase, char_u *fname, char_u **cptext, int cdir, int flags, int adup)); + static int ins_compl_equal __ARGS((compl_T *match, char_u *str, int len)); + static void ins_compl_longest_match __ARGS((compl_T *match)); + static void ins_compl_add_matches __ARGS((int num_matches, char_u **matches, int icase)); +*************** +*** 2118,2124 **** + * maybe because alloc() returns NULL, then FAIL is returned. + */ + static int +! ins_compl_add(str, len, icase, fname, cptext, cdir, flags, dup) + char_u *str; + int len; + int icase; +--- 2118,2124 ---- + * maybe because alloc() returns NULL, then FAIL is returned. + */ + static int +! ins_compl_add(str, len, icase, fname, cptext, cdir, flags, adup) + char_u *str; + int len; + int icase; +*************** +*** 2126,2132 **** + char_u **cptext; /* extra text for popup menu or NULL */ + int cdir; + int flags; +! int dup; /* accept duplicate match */ + { + compl_T *match; + int dir = (cdir == 0 ? compl_direction : cdir); +--- 2126,2132 ---- + char_u **cptext; /* extra text for popup menu or NULL */ + int cdir; + int flags; +! int adup; /* accept duplicate match */ + { + compl_T *match; + int dir = (cdir == 0 ? compl_direction : cdir); +*************** +*** 2140,2146 **** + /* + * If the same match is already present, don't add it. + */ +! if (compl_first_match != NULL && !dup) + { + match = compl_first_match; + do +--- 2140,2146 ---- + /* + * If the same match is already present, don't add it. + */ +! if (compl_first_match != NULL && !adup) + { + match = compl_first_match; + do +*************** +*** 3608,3614 **** + { + char_u *word; + int icase = FALSE; +! int dup = FALSE; + char_u *(cptext[CPT_COUNT]); + + if (tv->v_type == VAR_DICT && tv->vval.v_dict != NULL) +--- 3608,3614 ---- + { + char_u *word; + int icase = FALSE; +! int adup = FALSE; + char_u *(cptext[CPT_COUNT]); + + if (tv->v_type == VAR_DICT && tv->vval.v_dict != NULL) +*************** +*** 3625,3631 **** + if (get_dict_string(tv->vval.v_dict, (char_u *)"icase", FALSE) != NULL) + icase = get_dict_number(tv->vval.v_dict, (char_u *)"icase"); + if (get_dict_string(tv->vval.v_dict, (char_u *)"dup", FALSE) != NULL) +! dup = get_dict_number(tv->vval.v_dict, (char_u *)"dup"); + } + else + { +--- 3625,3631 ---- + if (get_dict_string(tv->vval.v_dict, (char_u *)"icase", FALSE) != NULL) + icase = get_dict_number(tv->vval.v_dict, (char_u *)"icase"); + if (get_dict_string(tv->vval.v_dict, (char_u *)"dup", FALSE) != NULL) +! adup = get_dict_number(tv->vval.v_dict, (char_u *)"dup"); + } + else + { +*************** +*** 3634,3640 **** + } + if (word == NULL || *word == NUL) + return FAIL; +! return ins_compl_add(word, -1, icase, NULL, cptext, dir, 0, dup); + } + #endif + +--- 3634,3640 ---- + } + if (word == NULL || *word == NUL) + return FAIL; +! return ins_compl_add(word, -1, icase, NULL, cptext, dir, 0, adup); + } + #endif + +*** ../vim-7.0.069/src/eval.c Wed Aug 16 22:03:35 2006 +--- src/eval.c Thu Aug 24 22:00:09 2006 +*************** +*** 454,460 **** + static char_u *deref_func_name __ARGS((char_u *name, int *lenp)); + static int get_func_tv __ARGS((char_u *name, int len, typval_T *rettv, char_u **arg, linenr_T firstline, linenr_T lastline, int *doesrange, int evaluate, dict_T *selfdict)); + static int call_func __ARGS((char_u *name, int len, typval_T *rettv, int argcount, typval_T *argvars, linenr_T firstline, linenr_T lastline, int *doesrange, int evaluate, dict_T *selfdict)); +! static void emsg_funcname __ARGS((char *msg, char_u *name)); + + static void f_add __ARGS((typval_T *argvars, typval_T *rettv)); + static void f_append __ARGS((typval_T *argvars, typval_T *rettv)); +--- 454,460 ---- + static char_u *deref_func_name __ARGS((char_u *name, int *lenp)); + static int get_func_tv __ARGS((char_u *name, int len, typval_T *rettv, char_u **arg, linenr_T firstline, linenr_T lastline, int *doesrange, int evaluate, dict_T *selfdict)); + static int call_func __ARGS((char_u *name, int len, typval_T *rettv, int argcount, typval_T *argvars, linenr_T firstline, linenr_T lastline, int *doesrange, int evaluate, dict_T *selfdict)); +! static void emsg_funcname __ARGS((char *ermsg, char_u *name)); + + static void f_add __ARGS((typval_T *argvars, typval_T *rettv)); + static void f_append __ARGS((typval_T *argvars, typval_T *rettv)); +*************** +*** 2260,2266 **** + EMSG(_(e_letunexp)); + else + { +! char_u *tofree = NULL; + char_u *s; + + p = get_tv_string_chk(tv); +--- 2260,2266 ---- + EMSG(_(e_letunexp)); + else + { +! char_u *ptofree = NULL; + char_u *s; + + p = get_tv_string_chk(tv); +*************** +*** 2269,2275 **** + s = get_reg_contents(*arg == '@' ? '"' : *arg, TRUE, TRUE); + if (s != NULL) + { +! p = tofree = concat_str(s, p); + vim_free(s); + } + } +--- 2269,2275 ---- + s = get_reg_contents(*arg == '@' ? '"' : *arg, TRUE, TRUE); + if (s != NULL) + { +! p = ptofree = concat_str(s, p); + vim_free(s); + } + } +*************** +*** 2278,2284 **** + write_reg_contents(*arg == '@' ? '"' : *arg, p, -1, FALSE); + arg_end = arg + 1; + } +! vim_free(tofree); + } + } + +--- 2278,2284 ---- + write_reg_contents(*arg == '@' ? '"' : *arg, p, -1, FALSE); + arg_end = arg + 1; + } +! vim_free(ptofree); + } + } + +*************** +*** 7595,7602 **** + * Give an error message with a function name. Handle things. + */ + static void +! emsg_funcname(msg, name) +! char *msg; + char_u *name; + { + char_u *p; +--- 7595,7602 ---- + * Give an error message with a function name. Handle things. + */ + static void +! emsg_funcname(ermsg, name) +! char *ermsg; + char_u *name; + { + char_u *p; +*************** +*** 7605,7611 **** + p = concat_str((char_u *)"", name + 3); + else + p = name; +! EMSG2(_(msg), p); + if (p != name) + vim_free(p); + } +--- 7605,7611 ---- + p = concat_str((char_u *)"", name + 3); + else + p = name; +! EMSG2(_(ermsg), p); + if (p != name) + vim_free(p); + } +*************** +*** 9179,9203 **** + typval_T save_key; + int rem; + int todo; +! char_u *msg = map ? (char_u *)"map()" : (char_u *)"filter()"; + int save_did_emsg; + + rettv->vval.v_number = 0; + if (argvars[0].v_type == VAR_LIST) + { + if ((l = argvars[0].vval.v_list) == NULL +! || (map && tv_check_lock(l->lv_lock, msg))) + return; + } + else if (argvars[0].v_type == VAR_DICT) + { + if ((d = argvars[0].vval.v_dict) == NULL +! || (map && tv_check_lock(d->dv_lock, msg))) + return; + } + else + { +! EMSG2(_(e_listdictarg), msg); + return; + } + +--- 9179,9203 ---- + typval_T save_key; + int rem; + int todo; +! char_u *ermsg = map ? (char_u *)"map()" : (char_u *)"filter()"; + int save_did_emsg; + + rettv->vval.v_number = 0; + if (argvars[0].v_type == VAR_LIST) + { + if ((l = argvars[0].vval.v_list) == NULL +! || (map && tv_check_lock(l->lv_lock, ermsg))) + return; + } + else if (argvars[0].v_type == VAR_DICT) + { + if ((d = argvars[0].vval.v_dict) == NULL +! || (map && tv_check_lock(d->dv_lock, ermsg))) + return; + } + else + { +! EMSG2(_(e_listdictarg), ermsg); + return; + } + +*************** +*** 9229,9235 **** + { + --todo; + di = HI2DI(hi); +! if (tv_check_lock(di->di_tv.v_lock, msg)) + break; + vimvars[VV_KEY].vv_str = vim_strsave(di->di_key); + if (filter_map_one(&di->di_tv, expr, map, &rem) == FAIL +--- 9229,9235 ---- + { + --todo; + di = HI2DI(hi); +! if (tv_check_lock(di->di_tv.v_lock, ermsg)) + break; + vimvars[VV_KEY].vv_str = vim_strsave(di->di_key); + if (filter_map_one(&di->di_tv, expr, map, &rem) == FAIL +*************** +*** 9248,9254 **** + { + for (li = l->lv_first; li != NULL; li = nli) + { +! if (tv_check_lock(li->li_tv.v_lock, msg)) + break; + nli = li->li_next; + if (filter_map_one(&li->li_tv, expr, map, &rem) == FAIL +--- 9248,9254 ---- + { + for (li = l->lv_first; li != NULL; li = nli) + { +! if (tv_check_lock(li->li_tv.v_lock, ermsg)) + break; + nli = li->li_next; + if (filter_map_one(&li->li_tv, expr, map, &rem) == FAIL +*************** +*** 19789,19795 **** + if (p_verbose >= 14) + { + char_u buf[MSG_BUF_LEN]; +! char_u numbuf[NUMBUFLEN]; + char_u *tofree; + + msg_puts((char_u *)"("); +--- 19789,19795 ---- + if (p_verbose >= 14) + { + char_u buf[MSG_BUF_LEN]; +! char_u numbuf2[NUMBUFLEN]; + char_u *tofree; + + msg_puts((char_u *)"("); +*************** +*** 19801,19808 **** + msg_outnum((long)argvars[i].vval.v_number); + else + { +! trunc_string(tv2string(&argvars[i], &tofree, numbuf, 0), +! buf, MSG_BUF_CLEN); + msg_puts(buf); + vim_free(tofree); + } +--- 19801,19808 ---- + msg_outnum((long)argvars[i].vval.v_number); + else + { +! trunc_string(tv2string(&argvars[i], &tofree, +! numbuf2, 0), buf, MSG_BUF_CLEN); + msg_puts(buf); + vim_free(tofree); + } +*************** +*** 19880,19892 **** + else + { + char_u buf[MSG_BUF_LEN]; +! char_u numbuf[NUMBUFLEN]; + char_u *tofree; + + /* The value may be very long. Skip the middle part, so that we + * have some idea how it starts and ends. smsg() would always + * truncate it at the end. */ +! trunc_string(tv2string(fc.rettv, &tofree, numbuf, 0), + buf, MSG_BUF_CLEN); + smsg((char_u *)_("%s returning %s"), sourcing_name, buf); + vim_free(tofree); +--- 19880,19892 ---- + else + { + char_u buf[MSG_BUF_LEN]; +! char_u numbuf2[NUMBUFLEN]; + char_u *tofree; + + /* The value may be very long. Skip the middle part, so that we + * have some idea how it starts and ends. smsg() would always + * truncate it at the end. */ +! trunc_string(tv2string(fc.rettv, &tofree, numbuf2, 0), + buf, MSG_BUF_CLEN); + smsg((char_u *)_("%s returning %s"), sourcing_name, buf); + vim_free(tofree); +*** ../vim-7.0.069/src/ex_cmds.c Sun Apr 23 00:33:23 2006 +--- src/ex_cmds.c Mon Aug 28 21:42:29 2006 +*************** +*** 185,190 **** +--- 185,191 ---- + new_indent = indent; + else + { ++ has_tab = FALSE; /* avoid uninit warnings */ + len = linelen(eap->cmdidx == CMD_right ? &has_tab + : NULL) - get_indent(); + +*************** +*** 1772,1781 **** + ? (st_old.st_mode & 0020) + : (st_old.st_mode & 0002)))) + { +! int tt; + + /* avoid a wait_return for this message, it's annoying */ +- tt = msg_didany; + EMSG2(_("E137: Viminfo file is not writable: %s"), fname); + msg_didany = tt; + fclose(fp_in); +--- 1773,1781 ---- + ? (st_old.st_mode & 0020) + : (st_old.st_mode & 0002)))) + { +! int tt = msg_didany; + + /* avoid a wait_return for this message, it's annoying */ + EMSG2(_("E137: Viminfo file is not writable: %s"), fname); + msg_didany = tt; + fclose(fp_in); +*** ../vim-7.0.069/src/ex_cmds2.c Tue Apr 18 00:10:47 2006 +--- src/ex_cmds2.c Thu Aug 24 22:01:44 2006 +*************** +*** 3648,3660 **** + * Return FALSE when not sourcing a file. + */ + int +! source_finished(getline, cookie) +! char_u *(*getline) __ARGS((int, void *, int)); + void *cookie; + { +! return (getline_equal(getline, cookie, getsourceline) + && ((struct source_cookie *)getline_cookie( +! getline, cookie))->finished); + } + #endif + +--- 3648,3660 ---- + * Return FALSE when not sourcing a file. + */ + int +! source_finished(fgetline, cookie) +! char_u *(*fgetline) __ARGS((int, void *, int)); + void *cookie; + { +! return (getline_equal(fgetline, cookie, getsourceline) + && ((struct source_cookie *)getline_cookie( +! fgetline, cookie))->finished); + } + #endif + +*** ../vim-7.0.069/src/ex_docmd.c Wed Aug 16 17:06:22 2006 +--- src/ex_docmd.c Thu Aug 24 22:03:17 2006 +*************** +*** 58,66 **** + #endif + + #ifdef FEAT_EVAL +! static char_u *do_one_cmd __ARGS((char_u **, int, struct condstack *, char_u *(*getline)(int, void *, int), void *cookie)); + #else +! static char_u *do_one_cmd __ARGS((char_u **, int, char_u *(*getline)(int, void *, int), void *cookie)); + static int if_level = 0; /* depth in :if */ + #endif + static char_u *find_command __ARGS((exarg_T *eap, int *full)); +--- 58,66 ---- + #endif + + #ifdef FEAT_EVAL +! static char_u *do_one_cmd __ARGS((char_u **, int, struct condstack *, char_u *(*fgetline)(int, void *, int), void *cookie)); + #else +! static char_u *do_one_cmd __ARGS((char_u **, int, char_u *(*fgetline)(int, void *, int), void *cookie)); + static int if_level = 0; /* depth in :if */ + #endif + static char_u *find_command __ARGS((exarg_T *eap, int *full)); +*************** +*** 831,840 **** + + /* + * If requested, store and reset the global values controlling the +! * exception handling (used when debugging). + */ + if (flags & DOCMD_EXCRESET) + save_dbg_stuff(&debug_saved); + + initial_trylevel = trylevel; + +--- 831,843 ---- + + /* + * If requested, store and reset the global values controlling the +! * exception handling (used when debugging). Otherwise clear it to avoid +! * a bogus compiler warning when the optimizer uses inline functions... + */ + if (flags & DOCMD_EXCRESET) + save_dbg_stuff(&debug_saved); ++ else ++ memset(&debug_saved, 0, 1); + + initial_trylevel = trylevel; + +*************** +*** 1574,1597 **** + #endif + + /* +! * If "getline" is get_loop_line(), return TRUE if the getline it uses equals +! * "func". * Otherwise return TRUE when "getline" equals "func". + */ + /*ARGSUSED*/ + int +! getline_equal(getline, cookie, func) +! char_u *(*getline) __ARGS((int, void *, int)); +! void *cookie; /* argument for getline() */ + char_u *(*func) __ARGS((int, void *, int)); + { + #ifdef FEAT_EVAL + char_u *(*gp) __ARGS((int, void *, int)); + struct loop_cookie *cp; + +! /* When "getline" is "get_loop_line()" use the "cookie" to find the + * function that's orignally used to obtain the lines. This may be nested + * several levels. */ +! gp = getline; + cp = (struct loop_cookie *)cookie; + while (gp == get_loop_line) + { +--- 1577,1600 ---- + #endif + + /* +! * If "fgetline" is get_loop_line(), return TRUE if the getline it uses equals +! * "func". * Otherwise return TRUE when "fgetline" equals "func". + */ + /*ARGSUSED*/ + int +! getline_equal(fgetline, cookie, func) +! char_u *(*fgetline) __ARGS((int, void *, int)); +! void *cookie; /* argument for fgetline() */ + char_u *(*func) __ARGS((int, void *, int)); + { + #ifdef FEAT_EVAL + char_u *(*gp) __ARGS((int, void *, int)); + struct loop_cookie *cp; + +! /* When "fgetline" is "get_loop_line()" use the "cookie" to find the + * function that's orignally used to obtain the lines. This may be nested + * several levels. */ +! gp = fgetline; + cp = (struct loop_cookie *)cookie; + while (gp == get_loop_line) + { +*************** +*** 1600,1628 **** + } + return gp == func; + #else +! return getline == func; + #endif + } + + #if defined(FEAT_EVAL) || defined(FEAT_MBYTE) || defined(PROTO) + /* +! * If "getline" is get_loop_line(), return the cookie used by the original + * getline function. Otherwise return "cookie". + */ + /*ARGSUSED*/ + void * +! getline_cookie(getline, cookie) +! char_u *(*getline) __ARGS((int, void *, int)); +! void *cookie; /* argument for getline() */ + { + # ifdef FEAT_EVAL + char_u *(*gp) __ARGS((int, void *, int)); + struct loop_cookie *cp; + +! /* When "getline" is "get_loop_line()" use the "cookie" to find the + * cookie that's orignally used to obtain the lines. This may be nested + * several levels. */ +! gp = getline; + cp = (struct loop_cookie *)cookie; + while (gp == get_loop_line) + { +--- 1603,1631 ---- + } + return gp == func; + #else +! return fgetline == func; + #endif + } + + #if defined(FEAT_EVAL) || defined(FEAT_MBYTE) || defined(PROTO) + /* +! * If "fgetline" is get_loop_line(), return the cookie used by the original + * getline function. Otherwise return "cookie". + */ + /*ARGSUSED*/ + void * +! getline_cookie(fgetline, cookie) +! char_u *(*fgetline) __ARGS((int, void *, int)); +! void *cookie; /* argument for fgetline() */ + { + # ifdef FEAT_EVAL + char_u *(*gp) __ARGS((int, void *, int)); + struct loop_cookie *cp; + +! /* When "fgetline" is "get_loop_line()" use the "cookie" to find the + * cookie that's orignally used to obtain the lines. This may be nested + * several levels. */ +! gp = fgetline; + cp = (struct loop_cookie *)cookie; + while (gp == get_loop_line) + { +*************** +*** 1648,1654 **** + * 5. parse arguments + * 6. switch on command name + * +! * Note: "getline" can be NULL. + * + * This function may be called recursively! + */ +--- 1651,1657 ---- + * 5. parse arguments + * 6. switch on command name + * +! * Note: "fgetline" can be NULL. + * + * This function may be called recursively! + */ +*************** +*** 1663,1676 **** + #ifdef FEAT_EVAL + cstack, + #endif +! getline, cookie) + char_u **cmdlinep; + int sourcing; + #ifdef FEAT_EVAL + struct condstack *cstack; + #endif +! char_u *(*getline) __ARGS((int, void *, int)); +! void *cookie; /* argument for getline() */ + { + char_u *p; + linenr_T lnum; +--- 1666,1679 ---- + #ifdef FEAT_EVAL + cstack, + #endif +! fgetline, cookie) + char_u **cmdlinep; + int sourcing; + #ifdef FEAT_EVAL + struct condstack *cstack; + #endif +! char_u *(*fgetline) __ARGS((int, void *, int)); +! void *cookie; /* argument for fgetline() */ + { + char_u *p; + linenr_T lnum; +*************** +*** 1698,1704 **** + if (quitmore + #ifdef FEAT_EVAL + /* avoid that a function call in 'statusline' does this */ +! && !getline_equal(getline, cookie, get_func_line) + #endif + ) + --quitmore; +--- 1701,1707 ---- + if (quitmore + #ifdef FEAT_EVAL + /* avoid that a function call in 'statusline' does this */ +! && !getline_equal(fgetline, cookie, get_func_line) + #endif + ) + --quitmore; +*************** +*** 1728,1735 **** + + /* in ex mode, an empty line works like :+ */ + if (*ea.cmd == NUL && exmode_active +! && (getline_equal(getline, cookie, getexmodeline) +! || getline_equal(getline, cookie, getexline)) + && curwin->w_cursor.lnum < curbuf->b_ml.ml_line_count) + { + ea.cmd = (char_u *)"+"; +--- 1731,1738 ---- + + /* in ex mode, an empty line works like :+ */ + if (*ea.cmd == NUL && exmode_active +! && (getline_equal(fgetline, cookie, getexmodeline) +! || getline_equal(fgetline, cookie, getexline)) + && curwin->w_cursor.lnum < curbuf->b_ml.ml_line_count) + { + ea.cmd = (char_u *)"+"; +*************** +*** 1918,1926 **** + /* Count this line for profiling if ea.skip is FALSE. */ + if (do_profiling == PROF_YES && !ea.skip) + { +! if (getline_equal(getline, cookie, get_func_line)) +! func_line_exec(getline_cookie(getline, cookie)); +! else if (getline_equal(getline, cookie, getsourceline)) + script_line_exec(); + } + #endif +--- 1921,1929 ---- + /* Count this line for profiling if ea.skip is FALSE. */ + if (do_profiling == PROF_YES && !ea.skip) + { +! if (getline_equal(fgetline, cookie, get_func_line)) +! func_line_exec(getline_cookie(fgetline, cookie)); +! else if (getline_equal(fgetline, cookie, getsourceline)) + script_line_exec(); + } + #endif +*************** +*** 2589,2595 **** + * The "ea" structure holds the arguments that can be used. + */ + ea.cmdlinep = cmdlinep; +! ea.getline = getline; + ea.cookie = cookie; + #ifdef FEAT_EVAL + ea.cstack = cstack; +--- 2592,2598 ---- + * The "ea" structure holds the arguments that can be used. + */ + ea.cmdlinep = cmdlinep; +! ea.getline = fgetline; + ea.cookie = cookie; + #ifdef FEAT_EVAL + ea.cstack = cstack; +*************** +*** 2627,2635 **** + do_throw(cstack); + else if (check_cstack) + { +! if (source_finished(getline, cookie)) + do_finish(&ea, TRUE); +! else if (getline_equal(getline, cookie, get_func_line) + && current_func_returned()) + do_return(&ea, TRUE, FALSE, NULL); + } +--- 2630,2638 ---- + do_throw(cstack); + else if (check_cstack) + { +! if (source_finished(fgetline, cookie)) + do_finish(&ea, TRUE); +! else if (getline_equal(fgetline, cookie, get_func_line) + && current_func_returned()) + do_return(&ea, TRUE, FALSE, NULL); + } +*** ../vim-7.0.069/src/gui_beval.c Thu May 4 23:57:11 2006 +--- src/gui_beval.c Thu Aug 24 22:39:50 2006 +*************** +*** 926,932 **** + # define IS_NONPRINTABLE(c) (((c) < 0x20 && (c) != TAB && (c) != NL) \ + || (c) == DEL) + static void +! set_printable_label_text(GtkLabel *label, char_u *msg) + { + char_u *convbuf = NULL; + char_u *buf; +--- 926,932 ---- + # define IS_NONPRINTABLE(c) (((c) < 0x20 && (c) != TAB && (c) != NL) \ + || (c) == DEL) + static void +! set_printable_label_text(GtkLabel *label, char_u *text) + { + char_u *convbuf = NULL; + char_u *buf; +*************** +*** 940,953 **** + /* Convert to UTF-8 if it isn't already */ + if (output_conv.vc_type != CONV_NONE) + { +! convbuf = string_convert(&output_conv, msg, NULL); + if (convbuf != NULL) +! msg = convbuf; + } + + /* First let's see how much we need to allocate */ + len = 0; +! for (p = msg; *p != NUL; p += charlen) + { + if ((*p & 0x80) == 0) /* be quick for ASCII */ + { +--- 940,953 ---- + /* Convert to UTF-8 if it isn't already */ + if (output_conv.vc_type != CONV_NONE) + { +! convbuf = string_convert(&output_conv, text, NULL); + if (convbuf != NULL) +! text = convbuf; + } + + /* First let's see how much we need to allocate */ + len = 0; +! for (p = text; *p != NUL; p += charlen) + { + if ((*p & 0x80) == 0) /* be quick for ASCII */ + { +*************** +*** 992,998 **** + (unsigned long)pixel, &color); + + pdest = buf; +! p = msg; + while (*p != NUL) + { + /* Be quick for ASCII */ +--- 992,998 ---- + (unsigned long)pixel, &color); + + pdest = buf; +! p = text; + while (*p != NUL) + { + /* Be quick for ASCII */ +*** ../vim-7.0.069/src/gui_gtk.c Fri May 5 23:13:49 2006 +--- src/gui_gtk.c Thu Aug 24 22:34:30 2006 +*************** +*** 957,971 **** + get_menu_position(vimmenu_T *menu) + { + vimmenu_T *node; +! int index = 0; + + for (node = menu->parent->children; node != menu; node = node->next) + { + g_return_val_if_fail(node != NULL, -1); +! ++index; + } + +! return index; + } + #endif /* FEAT_TOOLBAR && HAVE_GTK2 */ + +--- 957,971 ---- + get_menu_position(vimmenu_T *menu) + { + vimmenu_T *node; +! int idx = 0; + + for (node = menu->parent->children; node != menu; node = node->next) + { + g_return_val_if_fail(node != NULL, -1); +! ++idx; + } + +! return idx; + } + #endif /* FEAT_TOOLBAR && HAVE_GTK2 */ + +*************** +*** 2127,2133 **** + char **ync; /* "yes no cancel" */ + char **buttons; + int n_buttons = 0; +! int index; + + button_string = vim_strsave(button_string); /* must be writable */ + if (button_string == NULL) +--- 2128,2134 ---- + char **ync; /* "yes no cancel" */ + char **buttons; + int n_buttons = 0; +! int idx; + + button_string = vim_strsave(button_string); /* must be writable */ + if (button_string == NULL) +*************** +*** 2161,2172 **** + * Well, apparently somebody changed his mind: with GTK 2.2.4 it works the + * other way around... + */ +! for (index = 1; index <= n_buttons; ++index) + { + char *label; + char_u *label8; + +! label = buttons[index - 1]; + /* + * Perform some guesswork to find appropriate stock items for the + * buttons. We have to compare with a sample of the translated +--- 2162,2173 ---- + * Well, apparently somebody changed his mind: with GTK 2.2.4 it works the + * other way around... + */ +! for (idx = 1; idx <= n_buttons; ++idx) + { + char *label; + char_u *label8; + +! label = buttons[idx - 1]; + /* + * Perform some guesswork to find appropriate stock items for the + * buttons. We have to compare with a sample of the translated +*************** +*** 2188,2194 **** + else if (button_equal(label, "Cancel")) label = GTK_STOCK_CANCEL; + } + label8 = CONVERT_TO_UTF8((char_u *)label); +! gtk_dialog_add_button(dialog, (const gchar *)label8, index); + CONVERT_TO_UTF8_FREE(label8); + } + +--- 2189,2195 ---- + else if (button_equal(label, "Cancel")) label = GTK_STOCK_CANCEL; + } + label8 = CONVERT_TO_UTF8((char_u *)label); +! gtk_dialog_add_button(dialog, (const gchar *)label8, idx); + CONVERT_TO_UTF8_FREE(label8); + } + +*** ../vim-7.0.069/src/gui_gtk_x11.c Fri May 5 23:16:59 2006 +--- src/gui_gtk_x11.c Thu Aug 24 22:35:59 2006 +*************** +*** 3233,3244 **** + on_select_tab( + GtkNotebook *notebook, + GtkNotebookPage *page, +! gint index, + gpointer data) + { + if (!ignore_tabline_evt) + { +! if (send_tabline_event(index + 1) && gtk_main_level() > 0) + gtk_main_quit(); + } + } +--- 3233,3244 ---- + on_select_tab( + GtkNotebook *notebook, + GtkNotebookPage *page, +! gint idx, + gpointer data) + { + if (!ignore_tabline_evt) + { +! if (send_tabline_event(idx + 1) && gtk_main_level() > 0) + gtk_main_quit(); + } + } +*************** +*** 5303,5315 **** + # ifdef HAVE_GTK2 + if (font != NOFONT) + { +! char *name = pango_font_description_to_string(font); + +! if (name != NULL) + { +! char_u *s = vim_strsave((char_u *)name); + +! g_free(name); + return s; + } + } +--- 5303,5315 ---- + # ifdef HAVE_GTK2 + if (font != NOFONT) + { +! char *pangoname = pango_font_description_to_string(font); + +! if (pangoname != NULL) + { +! char_u *s = vim_strsave((char_u *)pangoname); + +! g_free(pangoname); + return s; + } + } +*************** +*** 6241,6264 **** + { + GdkGCValues values; + GdkGC *invert_gc; +- GdkColor foreground; +- GdkColor background; + + if (gui.drawarea->window == NULL) + return; + +! foreground.pixel = gui.norm_pixel ^ gui.back_pixel; +! background.pixel = gui.norm_pixel ^ gui.back_pixel; +! +! values.foreground = foreground; +! values.background = background; + values.function = GDK_XOR; + invert_gc = gdk_gc_new_with_values(gui.drawarea->window, + &values, + GDK_GC_FOREGROUND | + GDK_GC_BACKGROUND | + GDK_GC_FUNCTION); +! gdk_gc_set_exposures(invert_gc, gui.visibility != GDK_VISIBILITY_UNOBSCURED); + gdk_draw_rectangle(gui.drawarea->window, invert_gc, + TRUE, + FILL_X(c), FILL_Y(r), +--- 6241,6260 ---- + { + GdkGCValues values; + GdkGC *invert_gc; + + if (gui.drawarea->window == NULL) + return; + +! values.foreground.pixel = gui.norm_pixel ^ gui.back_pixel; +! values.background.pixel = gui.norm_pixel ^ gui.back_pixel; + values.function = GDK_XOR; + invert_gc = gdk_gc_new_with_values(gui.drawarea->window, + &values, + GDK_GC_FOREGROUND | + GDK_GC_BACKGROUND | + GDK_GC_FUNCTION); +! gdk_gc_set_exposures(invert_gc, gui.visibility != +! GDK_VISIBILITY_UNOBSCURED); + gdk_draw_rectangle(gui.drawarea->window, invert_gc, + TRUE, + FILL_X(c), FILL_Y(r), +*** ../vim-7.0.069/src/hardcopy.c Thu May 4 23:53:57 2006 +--- src/hardcopy.c Thu Aug 24 22:04:32 2006 +*************** +*** 1794,1822 **** + static int + prt_resfile_next_line() + { +! int index; + + /* Move to start of next line and then find end of line */ +! index = prt_resfile.line_end + 1; +! while (index < prt_resfile.len) + { +! if (prt_resfile.buffer[index] != PSLF && prt_resfile.buffer[index] +! != PSCR) + break; +! index++; + } +! prt_resfile.line_start = index; + +! while (index < prt_resfile.len) + { +! if (prt_resfile.buffer[index] == PSLF || prt_resfile.buffer[index] +! == PSCR) + break; +! index++; + } +! prt_resfile.line_end = index; + +! return (index < prt_resfile.len); + } + + static int +--- 1794,1820 ---- + static int + prt_resfile_next_line() + { +! int idx; + + /* Move to start of next line and then find end of line */ +! idx = prt_resfile.line_end + 1; +! while (idx < prt_resfile.len) + { +! if (prt_resfile.buffer[idx] != PSLF && prt_resfile.buffer[idx] != PSCR) + break; +! idx++; + } +! prt_resfile.line_start = idx; + +! while (idx < prt_resfile.len) + { +! if (prt_resfile.buffer[idx] == PSLF || prt_resfile.buffer[idx] == PSCR) + break; +! idx++; + } +! prt_resfile.line_end = idx; + +! return (idx < prt_resfile.len); + } + + static int +*************** +*** 1837,1850 **** + prt_resfile_skip_nonws(offset) + int offset; + { +! int index; + +! index = prt_resfile.line_start + offset; +! while (index < prt_resfile.line_end) + { +! if (isspace(prt_resfile.buffer[index])) +! return index - prt_resfile.line_start; +! index++; + } + return -1; + } +--- 1835,1848 ---- + prt_resfile_skip_nonws(offset) + int offset; + { +! int idx; + +! idx = prt_resfile.line_start + offset; +! while (idx < prt_resfile.line_end) + { +! if (isspace(prt_resfile.buffer[idx])) +! return idx - prt_resfile.line_start; +! idx++; + } + return -1; + } +*************** +*** 1853,1866 **** + prt_resfile_skip_ws(offset) + int offset; + { +! int index; + +! index = prt_resfile.line_start + offset; +! while (index < prt_resfile.line_end) + { +! if (!isspace(prt_resfile.buffer[index])) +! return index - prt_resfile.line_start; +! index++; + } + return -1; + } +--- 1851,1864 ---- + prt_resfile_skip_ws(offset) + int offset; + { +! int idx; + +! idx = prt_resfile.line_start + offset; +! while (idx < prt_resfile.line_end) + { +! if (!isspace(prt_resfile.buffer[idx])) +! return idx - prt_resfile.line_start; +! idx++; + } + return -1; + } +*************** +*** 2478,2484 **** + char_u *p_encoding; + struct prt_ps_encoding_S *p_mbenc; + struct prt_ps_encoding_S *p_mbenc_first; +! struct prt_ps_charset_S *p_mbchar; + #endif + + #if 0 +--- 2476,2482 ---- + char_u *p_encoding; + struct prt_ps_encoding_S *p_mbenc; + struct prt_ps_encoding_S *p_mbenc_first; +! struct prt_ps_charset_S *p_mbchar = NULL; + #endif + + #if 0 +*************** +*** 2516,2522 **** + if (!(props & ENC_8BIT) && ((*p_pmcs != NUL) || !(props & ENC_UNICODE))) + { + p_mbenc_first = NULL; +- p_mbchar = NULL; + for (cmap = 0; cmap < NUM_ELEMENTS(prt_ps_mbfonts); cmap++) + if (prt_match_encoding((char *)p_encoding, &prt_ps_mbfonts[cmap], + &p_mbenc)) +--- 2514,2519 ---- +*** ../vim-7.0.069/src/if_cscope.c Tue Apr 18 23:49:18 2006 +--- src/if_cscope.c Sat Jul 8 22:34:46 2006 +*************** +*** 989,996 **** + { + int i; + char *cmd; +! char **matches, **contexts; +! int nummatches[CSCOPE_MAX_CONNECTIONS], totmatches, matched; + #ifdef FEAT_QUICKFIX + char cmdletter; + char *qfpos; +--- 989,995 ---- + { + int i; + char *cmd; +! int nummatches[CSCOPE_MAX_CONNECTIONS], totmatches; + #ifdef FEAT_QUICKFIX + char cmdletter; + char *qfpos; +*************** +*** 1141,1146 **** +--- 1140,1148 ---- + else + #endif /* FEAT_QUICKFIX */ + { ++ char **matches = NULL, **contexts = NULL; ++ int matched = 0; ++ + /* read output */ + cs_fill_results((char *)pat, totmatches, nummatches, &matches, + &contexts, &matched); +*** ../vim-7.0.069/src/main.c Tue Aug 15 21:42:17 2006 +--- src/main.c Thu Aug 24 22:05:09 2006 +*************** +*** 2285,2291 **** + mparm_T *parmp; + { + #ifdef FEAT_WINDOWS +! int rewind; + int done = 0; + + /* +--- 2285,2291 ---- + mparm_T *parmp; + { + #ifdef FEAT_WINDOWS +! int dorewind; + int done = 0; + + /* +*************** +*** 2342,2351 **** + ++autocmd_no_leave; + #endif + #ifdef FEAT_WINDOWS +! rewind = TRUE; + while (done++ < 1000) + { +! if (rewind) + { + if (parmp->window_layout == WIN_TABS) + goto_tabpage(1); +--- 2342,2351 ---- + ++autocmd_no_leave; + #endif + #ifdef FEAT_WINDOWS +! dorewind = TRUE; + while (done++ < 1000) + { +! if (dorewind) + { + if (parmp->window_layout == WIN_TABS) + goto_tabpage(1); +*************** +*** 2364,2370 **** + break; + curwin = curwin->w_next; + } +! rewind = FALSE; + #endif + curbuf = curwin->w_buffer; + if (curbuf->b_ml.ml_mfp == NULL) +--- 2364,2370 ---- + break; + curwin = curwin->w_next; + } +! dorewind = FALSE; + #endif + curbuf = curwin->w_buffer; + if (curbuf->b_ml.ml_mfp == NULL) +*************** +*** 2385,2391 **** + check_swap_exists_action(); + #endif + #ifdef FEAT_AUTOCMD +! rewind = TRUE; /* start again */ + #endif + } + #ifdef FEAT_WINDOWS +--- 2385,2391 ---- + check_swap_exists_action(); + #endif + #ifdef FEAT_AUTOCMD +! dorewind = TRUE; /* start again */ + #endif + } + #ifdef FEAT_WINDOWS +*** ../vim-7.0.069/src/mbyte.c Tue Aug 29 16:10:54 2006 +--- src/mbyte.c Tue Aug 29 14:41:45 2006 +*************** +*** 3861,3873 **** + + if (preedit_string != NULL && attr_list != NULL) + { +! int index; + + /* Get the byte index as used by PangoAttrIterator */ +! for (index = 0; col > 0 && preedit_string[index] != '\0'; --col) +! index += utfc_ptr2len((char_u *)preedit_string + index); + +! if (preedit_string[index] != '\0') + { + PangoAttrIterator *iter; + int start, end; +--- 3861,3873 ---- + + if (preedit_string != NULL && attr_list != NULL) + { +! int idx; + + /* Get the byte index as used by PangoAttrIterator */ +! for (idx = 0; col > 0 && preedit_string[idx] != '\0'; --col) +! idx += utfc_ptr2len((char_u *)preedit_string + idx); + +! if (preedit_string[idx] != '\0') + { + PangoAttrIterator *iter; + int start, end; +*************** +*** 3880,3886 **** + { + pango_attr_iterator_range(iter, &start, &end); + +! if (index >= start && index < end) + char_attr |= translate_pango_attributes(iter); + } + while (pango_attr_iterator_next(iter)); +--- 3880,3886 ---- + { + pango_attr_iterator_range(iter, &start, &end); + +! if (idx >= start && idx < end) + char_attr |= translate_pango_attributes(iter); + } + while (pango_attr_iterator_next(iter)); +*** ../vim-7.0.069/src/memline.c Fri Apr 21 00:16:47 2006 +--- src/memline.c Thu Aug 24 22:06:17 2006 +*************** +*** 215,221 **** + #define ML_FLUSH 0x02 /* flush locked block */ + #define ML_SIMPLE(x) (x & 0x10) /* DEL, INS or FIND */ + +! static void ml_upd_block0 __ARGS((buf_T *buf, int setfname)); + static void set_b0_fname __ARGS((ZERO_BL *, buf_T *buf)); + static void set_b0_dir_flag __ARGS((ZERO_BL *b0p, buf_T *buf)); + #ifdef FEAT_MBYTE +--- 215,221 ---- + #define ML_FLUSH 0x02 /* flush locked block */ + #define ML_SIMPLE(x) (x & 0x10) /* DEL, INS or FIND */ + +! static void ml_upd_block0 __ARGS((buf_T *buf, int set_fname)); + static void set_b0_fname __ARGS((ZERO_BL *, buf_T *buf)); + static void set_b0_dir_flag __ARGS((ZERO_BL *b0p, buf_T *buf)); + #ifdef FEAT_MBYTE +*************** +*** 679,687 **** + * Update the timestamp or the B0_SAME_DIR flag of the .swp file. + */ + static void +! ml_upd_block0(buf, setfname) + buf_T *buf; +! int setfname; + { + memfile_T *mfp; + bhdr_T *hp; +--- 679,687 ---- + * Update the timestamp or the B0_SAME_DIR flag of the .swp file. + */ + static void +! ml_upd_block0(buf, set_fname) + buf_T *buf; +! int set_fname; + { + memfile_T *mfp; + bhdr_T *hp; +*************** +*** 695,701 **** + EMSG(_("E304: ml_upd_block0(): Didn't get block 0??")); + else + { +! if (setfname) + set_b0_fname(b0p, buf); + else + set_b0_dir_flag(b0p, buf); +--- 695,701 ---- + EMSG(_("E304: ml_upd_block0(): Didn't get block 0??")); + else + { +! if (set_fname) + set_b0_fname(b0p, buf); + else + set_b0_dir_flag(b0p, buf); +*** ../vim-7.0.069/src/netbeans.c Tue Aug 8 21:36:15 2006 +--- src/netbeans.c Thu Aug 24 22:42:09 2006 +*************** +*** 103,109 **** + static int inputHandler = -1; /* simply ret.value of WSAAsyncSelect() */ + extern HWND s_hwnd; /* Gvim's Window handle */ + #endif +! static int cmdno; /* current command number for reply */ + static int haveConnection = FALSE; /* socket is connected and + initialization is done */ + #ifdef FEAT_GUI_MOTIF +--- 103,109 ---- + static int inputHandler = -1; /* simply ret.value of WSAAsyncSelect() */ + extern HWND s_hwnd; /* Gvim's Window handle */ + #endif +! static int r_cmdno; /* current command number for reply */ + static int haveConnection = FALSE; /* socket is connected and + initialization is done */ + #ifdef FEAT_GUI_MOTIF +*************** +*** 832,842 **** + return; + } + +! cmdno = strtol(q, &q, 10); + + q = (char *)skipwhite((char_u *)q); + +! if (nb_do_cmd(bufno, (char_u *)verb, isfunc, cmdno, (char_u *)q) == FAIL) + { + #ifdef NBDEBUG + /* +--- 832,842 ---- + return; + } + +! r_cmdno = strtol(q, &q, 10); + + q = (char *)skipwhite((char_u *)q); + +! if (nb_do_cmd(bufno, (char_u *)verb, isfunc, r_cmdno, (char_u *)q) == FAIL) + { + #ifdef NBDEBUG + /* +*************** +*** 1008,1018 **** + if (netbeansForcedQuit) + { + /* mark as unmodified so NetBeans won't put up dialog on "killed" */ +! sprintf(buf, "%d:unmodified=%d\n", i, cmdno); + nbdebug(("EVT: %s", buf)); + nb_send(buf, "netbeans_end"); + } +! sprintf(buf, "%d:killed=%d\n", i, cmdno); + nbdebug(("EVT: %s", buf)); + /* nb_send(buf, "netbeans_end"); avoid "write failed" messages */ + if (sd >= 0) +--- 1008,1018 ---- + if (netbeansForcedQuit) + { + /* mark as unmodified so NetBeans won't put up dialog on "killed" */ +! sprintf(buf, "%d:unmodified=%d\n", i, r_cmdno); + nbdebug(("EVT: %s", buf)); + nb_send(buf, "netbeans_end"); + } +! sprintf(buf, "%d:killed=%d\n", i, r_cmdno); + nbdebug(("EVT: %s", buf)); + /* nb_send(buf, "netbeans_end"); avoid "write failed" messages */ + if (sd >= 0) +*************** +*** 2563,2569 **** + if (p != NULL) + { + vim_snprintf(buf, sizeof(buf), +! "0:balloonText=%d \"%s\"\n", cmdno, p); + vim_free(p); + } + nbdebug(("EVT: %s", buf)); +--- 2563,2569 ---- + if (p != NULL) + { + vim_snprintf(buf, sizeof(buf), +! "0:balloonText=%d \"%s\"\n", r_cmdno, p); + vim_free(p); + } + nbdebug(("EVT: %s", buf)); +*************** +*** 2617,2623 **** + + if (haveConnection) + { +! sprintf(buf, "0:disconnect=%d\n", cmdno); + nbdebug(("EVT: %s", buf)); + nb_send(buf, "netbeans_disconnect"); + } +--- 2617,2623 ---- + + if (haveConnection) + { +! sprintf(buf, "0:disconnect=%d\n", r_cmdno); + nbdebug(("EVT: %s", buf)); + nb_send(buf, "netbeans_disconnect"); + } +*************** +*** 2636,2642 **** + return; + + sprintf(buf, "0:geometry=%d %d %d %d %d\n", +! cmdno, (int)Columns, (int)Rows, new_x, new_y); + /*nbdebug(("EVT: %s", buf)); happens too many times during a move */ + nb_send(buf, "netbeans_frame_moved"); + } +--- 2636,2642 ---- + return; + + sprintf(buf, "0:geometry=%d %d %d %d %d\n", +! r_cmdno, (int)Columns, (int)Rows, new_x, new_y); + /*nbdebug(("EVT: %s", buf)); happens too many times during a move */ + nb_send(buf, "netbeans_frame_moved"); + } +*************** +*** 2745,2751 **** + if (bufno <= 0) + return; + +! sprintf(buffer, "%d:killed=%d\n", bufno, cmdno); + + nbdebug(("EVT: %s", buffer)); + +--- 2745,2751 ---- + if (bufno <= 0) + return; + +! sprintf(buffer, "%d:killed=%d\n", bufno, r_cmdno); + + nbdebug(("EVT: %s", buffer)); + +*************** +*** 2819,2825 **** + if (p != NULL) + { + buf = alloc(128 + 2*newlen); +! sprintf((char *)buf, "%d:insert=%d %ld \"%s\"\n", bufno, cmdno, off, p); + nbdebug(("EVT: %s", buf)); + nb_send((char *)buf, "netbeans_inserted"); + vim_free(p); +--- 2819,2826 ---- + if (p != NULL) + { + buf = alloc(128 + 2*newlen); +! sprintf((char *)buf, "%d:insert=%d %ld \"%s\"\n", +! bufno, r_cmdno, off, p); + nbdebug(("EVT: %s", buf)); + nb_send((char *)buf, "netbeans_inserted"); + vim_free(p); +*************** +*** 2861,2867 **** + + off = pos2off(bufp, &pos); + +! sprintf((char *)buf, "%d:remove=%d %ld %ld\n", bufno, cmdno, off, len); + nbdebug(("EVT: %s", buf)); + nb_send((char *)buf, "netbeans_removed"); + } +--- 2862,2868 ---- + + off = pos2off(bufp, &pos); + +! sprintf((char *)buf, "%d:remove=%d %ld %ld\n", bufno, r_cmdno, off, len); + nbdebug(("EVT: %s", buf)); + nb_send((char *)buf, "netbeans_removed"); + } +*************** +*** 2886,2892 **** + + nbbuf->modified = 0; + +! sprintf((char *)buf, "%d:unmodified=%d\n", bufno, cmdno); + nbdebug(("EVT: %s", buf)); + nb_send((char *)buf, "netbeans_unmodified"); + #endif +--- 2887,2893 ---- + + nbbuf->modified = 0; + +! sprintf((char *)buf, "%d:unmodified=%d\n", bufno, r_cmdno); + nbdebug(("EVT: %s", buf)); + nb_send((char *)buf, "netbeans_unmodified"); + #endif +*************** +*** 2910,2920 **** + long off = pos2off(curbuf, &curwin->w_cursor); + + /* sync the cursor position */ +! sprintf(buf, "%d:newDotAndMark=%d %ld %ld\n", bufno, cmdno, off, off); + nbdebug(("EVT: %s", buf)); + nb_send(buf, "netbeans_button_release[newDotAndMark]"); + +! sprintf(buf, "%d:buttonRelease=%d %d %ld %d\n", bufno, cmdno, + button, (long)curwin->w_cursor.lnum, col); + nbdebug(("EVT: %s", buf)); + nb_send(buf, "netbeans_button_release"); +--- 2911,2921 ---- + long off = pos2off(curbuf, &curwin->w_cursor); + + /* sync the cursor position */ +! sprintf(buf, "%d:newDotAndMark=%d %ld %ld\n", bufno, r_cmdno, off, off); + nbdebug(("EVT: %s", buf)); + nb_send(buf, "netbeans_button_release[newDotAndMark]"); + +! sprintf(buf, "%d:buttonRelease=%d %d %ld %d\n", bufno, r_cmdno, + button, (long)curwin->w_cursor.lnum, col); + nbdebug(("EVT: %s", buf)); + nb_send(buf, "netbeans_button_release"); +*************** +*** 2975,2981 **** + + /* sync the cursor position */ + off = pos2off(curbuf, &curwin->w_cursor); +! sprintf(buf, "%d:newDotAndMark=%d %ld %ld\n", bufno, cmdno, off, off); + nbdebug(("EVT: %s", buf)); + nb_send(buf, "netbeans_keycommand"); + +--- 2976,2982 ---- + + /* sync the cursor position */ + off = pos2off(curbuf, &curwin->w_cursor); +! sprintf(buf, "%d:newDotAndMark=%d %ld %ld\n", bufno, r_cmdno, off, off); + nbdebug(("EVT: %s", buf)); + nb_send(buf, "netbeans_keycommand"); + +*************** +*** 2986,2998 **** + + /* now send keyCommand event */ + vim_snprintf(buf, sizeof(buf), "%d:keyCommand=%d \"%s\"\n", +! bufno, cmdno, keyName); + nbdebug(("EVT: %s", buf)); + nb_send(buf, "netbeans_keycommand"); + + /* New: do both at once and include the lnum/col. */ + vim_snprintf(buf, sizeof(buf), "%d:keyAtPos=%d \"%s\" %ld %ld/%ld\n", +! bufno, cmdno, keyName, + off, (long)curwin->w_cursor.lnum, (long)curwin->w_cursor.col); + nbdebug(("EVT: %s", buf)); + nb_send(buf, "netbeans_keycommand"); +--- 2987,2999 ---- + + /* now send keyCommand event */ + vim_snprintf(buf, sizeof(buf), "%d:keyCommand=%d \"%s\"\n", +! bufno, r_cmdno, keyName); + nbdebug(("EVT: %s", buf)); + nb_send(buf, "netbeans_keycommand"); + + /* New: do both at once and include the lnum/col. */ + vim_snprintf(buf, sizeof(buf), "%d:keyAtPos=%d \"%s\" %ld %ld/%ld\n", +! bufno, r_cmdno, keyName, + off, (long)curwin->w_cursor.lnum, (long)curwin->w_cursor.col); + nbdebug(("EVT: %s", buf)); + nb_send(buf, "netbeans_keycommand"); +*************** +*** 3015,3021 **** + + nbbuf->modified = 0; + +! sprintf((char *)buf, "%d:save=%d\n", bufno, cmdno); + nbdebug(("EVT: %s", buf)); + nb_send((char *)buf, "netbeans_save_buffer"); + } +--- 3016,3022 ---- + + nbbuf->modified = 0; + +! sprintf((char *)buf, "%d:save=%d\n", bufno, r_cmdno); + nbdebug(("EVT: %s", buf)); + nb_send((char *)buf, "netbeans_save_buffer"); + } +*************** +*** 3039,3045 **** + if (nbbuf->insertDone) + nbbuf->modified = 1; + +! sprintf((char *)buf, "%d:remove=%d 0 -1\n", bufno, cmdno); + nbdebug(("EVT(suppressed): %s", buf)); + /* nb_send(buf, "netbeans_deleted_all_lines"); */ + } +--- 3040,3046 ---- + if (nbbuf->insertDone) + nbbuf->modified = 1; + +! sprintf((char *)buf, "%d:remove=%d 0 -1\n", bufno, r_cmdno); + nbdebug(("EVT(suppressed): %s", buf)); + /* nb_send(buf, "netbeans_deleted_all_lines"); */ + } +*** ../vim-7.0.069/src/normal.c Wed Aug 16 21:42:34 2006 +--- src/normal.c Thu Aug 24 22:17:37 2006 +*************** +*** 4127,4133 **** + int save_p_ws; + int save_p_scs; + int retval = OK; +! int incl; + + if ((pat = alloc(len + 7)) == NULL) + return FAIL; +--- 4127,4133 ---- + int save_p_ws; + int save_p_scs; + int retval = OK; +! int incll; + + if ((pat = alloc(len + 7)) == NULL) + return FAIL; +*************** +*** 4147,4153 **** + * With "gd" Search back for the start of the current function, then go + * back until a blank line. If this fails go to line 1. + */ +! if (!locally || !findpar(&incl, BACKWARD, 1L, '{', FALSE)) + { + setpcmark(); /* Set in findpar() otherwise */ + curwin->w_cursor.lnum = 1; +--- 4147,4153 ---- + * With "gd" Search back for the start of the current function, then go + * back until a blank line. If this fails go to line 1. + */ +! if (!locally || !findpar(&incll, BACKWARD, 1L, '{', FALSE)) + { + setpcmark(); /* Set in findpar() otherwise */ + curwin->w_cursor.lnum = 1; +*** ../vim-7.0.069/src/option.c Tue Aug 8 16:30:51 2006 +--- src/option.c Wed Aug 16 21:54:45 2006 +*************** +*** 5268,5312 **** + char_u *s; + char_u **varp; + int both = (opt_flags & (OPT_LOCAL | OPT_GLOBAL)) == 0; + +! if (opt_idx == -1) /* use name */ + { +! opt_idx = findoption(name); +! if (opt_idx < 0) /* not found (should not happen) */ + { + EMSG2(_(e_intern2), "set_string_option_direct()"); + return; + } + } + +! if (options[opt_idx].var == NULL) /* can't set hidden option */ + return; + + s = vim_strsave(val); + if (s != NULL) + { +! varp = (char_u **)get_varp_scope(&(options[opt_idx]), + both ? OPT_LOCAL : opt_flags); +! if ((opt_flags & OPT_FREE) && (options[opt_idx].flags & P_ALLOCED)) + free_string_option(*varp); + *varp = s; + + /* For buffer/window local option may also set the global value. */ + if (both) +! set_string_option_global(opt_idx, varp); + +! options[opt_idx].flags |= P_ALLOCED; + + /* When setting both values of a global option with a local value, + * make the local value empty, so that the global value is used. */ +! if (((int)options[opt_idx].indir & PV_BOTH) && both) + { + free_string_option(*varp); + *varp = empty_option; + } + # ifdef FEAT_EVAL + if (set_sid != SID_NONE) +! set_option_scriptID_idx(opt_idx, opt_flags, + set_sid == 0 ? current_SID : set_sid); + # endif + } +--- 5268,5313 ---- + char_u *s; + char_u **varp; + int both = (opt_flags & (OPT_LOCAL | OPT_GLOBAL)) == 0; ++ int idx = opt_idx; + +! if (idx == -1) /* use name */ + { +! idx = findoption(name); +! if (idx < 0) /* not found (should not happen) */ + { + EMSG2(_(e_intern2), "set_string_option_direct()"); + return; + } + } + +! if (options[idx].var == NULL) /* can't set hidden option */ + return; + + s = vim_strsave(val); + if (s != NULL) + { +! varp = (char_u **)get_varp_scope(&(options[idx]), + both ? OPT_LOCAL : opt_flags); +! if ((opt_flags & OPT_FREE) && (options[idx].flags & P_ALLOCED)) + free_string_option(*varp); + *varp = s; + + /* For buffer/window local option may also set the global value. */ + if (both) +! set_string_option_global(idx, varp); + +! options[idx].flags |= P_ALLOCED; + + /* When setting both values of a global option with a local value, + * make the local value empty, so that the global value is used. */ +! if (((int)options[idx].indir & PV_BOTH) && both) + { + free_string_option(*varp); + *varp = empty_option; + } + # ifdef FEAT_EVAL + if (set_sid != SID_NONE) +! set_option_scriptID_idx(idx, opt_flags, + set_sid == 0 ? current_SID : set_sid); + # endif + } +*** ../vim-7.0.069/src/os_unix.c Thu Jun 22 19:47:11 2006 +--- src/os_unix.c Thu Aug 24 22:21:56 2006 +*************** +*** 3934,3940 **** + { + linenr_T lnum = curbuf->b_op_start.lnum; + int written = 0; +! char_u *p = ml_get(lnum); + char_u *s; + size_t l; + +--- 3934,3940 ---- + { + linenr_T lnum = curbuf->b_op_start.lnum; + int written = 0; +! char_u *lp = ml_get(lnum); + char_u *s; + size_t l; + +*************** +*** 3942,3958 **** + close(fromshell_fd); + for (;;) + { +! l = STRLEN(p + written); + if (l == 0) + len = 0; +! else if (p[written] == NL) + /* NL -> NUL translation */ + len = write(toshell_fd, "", (size_t)1); + else + { +! s = vim_strchr(p + written, NL); +! len = write(toshell_fd, (char *)p + written, +! s == NULL ? l : s - (p + written)); + } + if (len == l) + { +--- 3942,3958 ---- + close(fromshell_fd); + for (;;) + { +! l = STRLEN(lp + written); + if (l == 0) + len = 0; +! else if (lp[written] == NL) + /* NL -> NUL translation */ + len = write(toshell_fd, "", (size_t)1); + else + { +! s = vim_strchr(lp + written, NL); +! len = write(toshell_fd, (char *)lp + written, +! s == NULL ? l : s - (lp + written)); + } + if (len == l) + { +*************** +*** 3973,3979 **** + toshell_fd = -1; + break; + } +! p = ml_get(lnum); + written = 0; + } + else if (len > 0) +--- 3973,3979 ---- + toshell_fd = -1; + break; + } +! lp = ml_get(lnum); + written = 0; + } + else if (len > 0) +*** ../vim-7.0.069/src/quickfix.c Wed Aug 16 19:34:59 2006 +--- src/quickfix.c Thu Aug 24 22:23:31 2006 +*************** +*** 500,507 **** + { + if (tv != NULL) + { +- int len; +- + if (tv->v_type == VAR_STRING) + { + /* Get the next line from the supplied string */ +--- 500,505 ---- +*** ../vim-7.0.069/src/regexp.c Sun Apr 30 20:38:22 2006 +--- src/regexp.c Thu Aug 24 22:25:15 2006 +*************** +*** 3912,3918 **** + { + colnr_T start, end; + colnr_T start2, end2; +! colnr_T col; + + getvvcol(wp, &top, &start, NULL, &end); + getvvcol(wp, &bot, &start2, NULL, &end2); +--- 3919,3925 ---- + { + colnr_T start, end; + colnr_T start2, end2; +! colnr_T cols; + + getvvcol(wp, &top, &start, NULL, &end); + getvvcol(wp, &bot, &start2, NULL, &end2); +*************** +*** 3922,3930 **** + end = end2; + if (top.col == MAXCOL || bot.col == MAXCOL) + end = MAXCOL; +! col = win_linetabsize(wp, + regline, (colnr_T)(reginput - regline)); +! if (col < start || col > end - (*p_sel == 'e')) + status = RA_NOMATCH; + } + } +--- 3929,3937 ---- + end = end2; + if (top.col == MAXCOL || bot.col == MAXCOL) + end = MAXCOL; +! cols = win_linetabsize(wp, + regline, (colnr_T)(reginput - regline)); +! if (cols < start || cols > end - (*p_sel == 'e')) + status = RA_NOMATCH; + } + } +*************** +*** 4253,4259 **** + { + int i, len; + char_u *opnd; +! int opndc, inpc; + + opnd = OPERAND(scan); + /* Safety check (just in case 'encoding' was changed since +--- 4260,4266 ---- + { + int i, len; + char_u *opnd; +! int opndc = 0, inpc; + + opnd = OPERAND(scan); + /* Safety check (just in case 'encoding' was changed since +*** ../vim-7.0.069/src/screen.c Tue Jul 11 22:59:04 2006 +--- src/screen.c Thu Aug 24 22:26:16 2006 +*************** +*** 7099,7105 **** + tabpage_T *tp; + #endif + static int entered = FALSE; /* avoid recursiveness */ +! static int did_outofmem_msg = FALSE; /* did outofmem message */ + + /* + * Allocation of the screen buffers is done only when the size changes and +--- 7099,7105 ---- + tabpage_T *tp; + #endif + static int entered = FALSE; /* avoid recursiveness */ +! static int done_outofmem_msg = FALSE; /* did outofmem message */ + + /* + * Allocation of the screen buffers is done only when the size changes and +*************** +*** 7207,7220 **** + #endif + || outofmem) + { +! if (ScreenLines != NULL || !did_outofmem_msg) + { + /* guess the size */ + do_outofmem_msg((long_u)((Rows + 1) * Columns)); + + /* Remember we did this to avoid getting outofmem messages over + * and over again. */ +! did_outofmem_msg = TRUE; + } + vim_free(new_ScreenLines); + new_ScreenLines = NULL; +--- 7207,7220 ---- + #endif + || outofmem) + { +! if (ScreenLines != NULL || !done_outofmem_msg) + { + /* guess the size */ + do_outofmem_msg((long_u)((Rows + 1) * Columns)); + + /* Remember we did this to avoid getting outofmem messages over + * and over again. */ +! done_outofmem_msg = TRUE; + } + vim_free(new_ScreenLines); + new_ScreenLines = NULL; +*************** +*** 7242,7248 **** + } + else + { +! did_outofmem_msg = FALSE; + + for (new_row = 0; new_row < Rows; ++new_row) + { +--- 7242,7248 ---- + } + else + { +! done_outofmem_msg = FALSE; + + for (new_row = 0; new_row < Rows; ++new_row) + { +*** ../vim-7.0.069/src/search.c Tue Aug 29 16:33:23 2006 +--- src/search.c Tue Aug 29 14:56:15 2006 +*************** +*** 4826,4840 **** + + if ((compl_cont_status & CONT_ADDING) && i == compl_length) + { +- /* get the next line */ + /* IOSIZE > compl_length, so the STRNCPY works */ + STRNCPY(IObuff, aux, i); +! if (!( depth < 0 +! && lnum < end_lnum +! && (line = ml_get(++lnum)) != NULL) +! && !( depth >= 0 +! && !vim_fgets(line = file_line, +! LSIZE, files[depth].fp))) + goto exit_matched; + + /* we read a line, set "already" to check this "line" later +--- 4826,4845 ---- + + if ((compl_cont_status & CONT_ADDING) && i == compl_length) + { + /* IOSIZE > compl_length, so the STRNCPY works */ + STRNCPY(IObuff, aux, i); +! +! /* Get the next line: when "depth" < 0 from the current +! * buffer, otherwise from the included file. Jump to +! * exit_matched when past the last line. */ +! if (depth < 0) +! { +! if (lnum >= end_lnum) +! goto exit_matched; +! line = ml_get(++lnum); +! } +! else if (vim_fgets(line = file_line, +! LSIZE, files[depth].fp)) + goto exit_matched; + + /* we read a line, set "already" to check this "line" later +*** ../vim-7.0.069/src/spell.c Tue Aug 29 16:33:23 2006 +--- src/spell.c Tue Aug 29 14:56:26 2006 +*************** +*** 2043,2050 **** + int len; + # ifdef FEAT_SYN_HL + int has_syntax = syntax_present(wp->w_buffer); +- int col; + # endif + int can_spell; + char_u *buf = NULL; + int buflen = 0; +--- 2043,2050 ---- + int len; + # ifdef FEAT_SYN_HL + int has_syntax = syntax_present(wp->w_buffer); + # endif ++ int col; + int can_spell; + char_u *buf = NULL; + int buflen = 0; +*************** +*** 2093,2101 **** + capcol = (int)(skipwhite(line) - line); + else if (curline && wp == curwin) + { +- int col = (int)(skipwhite(line) - line); +- + /* For spellbadword(): check if first word needs a capital. */ + if (check_need_cap(lnum, col)) + capcol = col; + +--- 2093,2100 ---- + capcol = (int)(skipwhite(line) - line); + else if (curline && wp == curwin) + { + /* For spellbadword(): check if first word needs a capital. */ ++ col = (int)(skipwhite(line) - line); + if (check_need_cap(lnum, col)) + capcol = col; + +*************** +*** 5061,5067 **** + int do_rep; + int do_repsal; + int do_sal; +! int do_map; + int found_map = FALSE; + hashitem_T *hi; + int l; +--- 5060,5066 ---- + int do_rep; + int do_repsal; + int do_sal; +! int do_mapline; + int found_map = FALSE; + hashitem_T *hi; + int l; +*************** +*** 5099,5105 **** + do_sal = spin->si_sal.ga_len == 0; + + /* Only do MAP lines when not done in another .aff file already. */ +! do_map = spin->si_map.ga_len == 0; + + /* + * Allocate and init the afffile_T structure. +--- 5098,5104 ---- + do_sal = spin->si_sal.ga_len == 0; + + /* Only do MAP lines when not done in another .aff file already. */ +! do_mapline = spin->si_map.ga_len == 0; + + /* + * Allocate and init the afffile_T structure. +*************** +*** 5781,5787 **** + smsg((char_u *)_("Expected MAP count in %s line %d"), + fname, lnum); + } +! else if (do_map) + { + int c; + +--- 5780,5786 ---- + smsg((char_u *)_("Expected MAP count in %s line %d"), + fname, lnum); + } +! else if (do_mapline) + { + int c; + +*************** +*** 7508,7514 **** + { + char_u *p = p_msm; + long start = 0; +! long inc = 0; + long added = 0; + + if (!VIM_ISDIGIT(*p)) +--- 7507,7513 ---- + { + char_u *p = p_msm; + long start = 0; +! long incr = 0; + long added = 0; + + if (!VIM_ISDIGIT(*p)) +*************** +*** 7520,7526 **** + ++p; + if (!VIM_ISDIGIT(*p)) + return FAIL; +! inc = (getdigits(&p) * 102) / (SBLOCKSIZE / 10); + if (*p != ',') + return FAIL; + ++p; +--- 7519,7525 ---- + ++p; + if (!VIM_ISDIGIT(*p)) + return FAIL; +! incr = (getdigits(&p) * 102) / (SBLOCKSIZE / 10); + if (*p != ',') + return FAIL; + ++p; +*************** +*** 7530,7540 **** + if (*p != NUL) + return FAIL; + +! if (start == 0 || inc == 0 || added == 0 || inc > start) + return FAIL; + + compress_start = start; +! compress_inc = inc; + compress_added = added; + return OK; + } +--- 7529,7539 ---- + if (*p != NUL) + return FAIL; + +! if (start == 0 || incr == 0 || added == 0 || incr > start) + return FAIL; + + compress_start = start; +! compress_inc = incr; + compress_added = added; + return OK; + } +*************** +*** 8292,8305 **** + * Returns the number of nodes used. + */ + static int +! put_node(fd, node, index, regionmask, prefixtree) + FILE *fd; /* NULL when only counting */ + wordnode_T *node; +! int index; + int regionmask; + int prefixtree; /* TRUE for PREFIXTREE */ + { +! int newindex = index; + int siblingcount = 0; + wordnode_T *np; + int flags; +--- 8291,8304 ---- + * Returns the number of nodes used. + */ + static int +! put_node(fd, node, idx, regionmask, prefixtree) + FILE *fd; /* NULL when only counting */ + wordnode_T *node; +! int idx; + int regionmask; + int prefixtree; /* TRUE for PREFIXTREE */ + { +! int newindex = idx; + int siblingcount = 0; + wordnode_T *np; + int flags; +*************** +*** 8309,8315 **** + return 0; + + /* Store the index where this node is written. */ +! node->wn_u1.index = index; + + /* Count the number of siblings. */ + for (np = node; np != NULL; np = np->wn_sibling) +--- 8308,8314 ---- + return 0; + + /* Store the index where this node is written. */ +! node->wn_u1.index = idx; + + /* Count the number of siblings. */ + for (np = node; np != NULL; np = np->wn_sibling) +*************** +*** 9244,9254 **** + * Add "word[len]" to 'spellfile' as a good or bad word. + */ + void +! spell_add_word(word, len, bad, index, undo) + char_u *word; + int len; + int bad; +! int index; /* "zG" and "zW": zero, otherwise index in + 'spellfile' */ + int undo; /* TRUE for "zug", "zuG", "zuw" and "zuW" */ + { +--- 9243,9253 ---- + * Add "word[len]" to 'spellfile' as a good or bad word. + */ + void +! spell_add_word(word, len, bad, idx, undo) + char_u *word; + int len; + int bad; +! int idx; /* "zG" and "zW": zero, otherwise index in + 'spellfile' */ + int undo; /* TRUE for "zug", "zuG", "zuw" and "zuW" */ + { +*************** +*** 9262,9268 **** + int i; + char_u *spf; + +! if (index == 0) /* use internal wordlist */ + { + if (int_wordlist == NULL) + { +--- 9261,9267 ---- + int i; + char_u *spf; + +! if (idx == 0) /* use internal wordlist */ + { + if (int_wordlist == NULL) + { +*************** +*** 9290,9300 **** + for (spf = curbuf->b_p_spf, i = 1; *spf != NUL; ++i) + { + copy_option_part(&spf, fnamebuf, MAXPATHL, ","); +! if (i == index) + break; + if (*spf == NUL) + { +! EMSGN(_("E765: 'spellfile' does not have %ld entries"), index); + return; + } + } +--- 9289,9299 ---- + for (spf = curbuf->b_p_spf, i = 1; *spf != NUL; ++i) + { + copy_option_part(&spf, fnamebuf, MAXPATHL, ","); +! if (i == idx) + break; + if (*spf == NUL) + { +! EMSGN(_("E765: 'spellfile' does not have %ld entries"), idx); + return; + } + } +*************** +*** 13581,13633 **** + * the first "the" to itself. */ + return; + +! /* Check if the word is already there. Also check the length that is +! * being replaced "thes," -> "these" is a different suggestion from +! * "thes" -> "these". */ +! stp = &SUG(*gap, 0); +! for (i = gap->ga_len; --i >= 0; ++stp) +! if (stp->st_wordlen == goodlen +! && stp->st_orglen == badlen +! && STRNCMP(stp->st_word, goodword, goodlen) == 0) +! { +! /* +! * Found it. Remember the word with the lowest score. +! */ +! if (stp->st_slang == NULL) +! stp->st_slang = slang; + +! new_sug.st_score = score; +! new_sug.st_altscore = altscore; +! new_sug.st_had_bonus = had_bonus; +! +! if (stp->st_had_bonus != had_bonus) +! { +! /* Only one of the two had the soundalike score computed. +! * Need to do that for the other one now, otherwise the +! * scores can't be compared. This happens because +! * suggest_try_change() doesn't compute the soundalike +! * word to keep it fast, while some special methods set +! * the soundalike score to zero. */ +! if (had_bonus) +! rescore_one(su, stp); +! else +! { +! new_sug.st_word = stp->st_word; +! new_sug.st_wordlen = stp->st_wordlen; +! new_sug.st_slang = stp->st_slang; +! new_sug.st_orglen = badlen; +! rescore_one(su, &new_sug); + } +- } + +! if (stp->st_score > new_sug.st_score) +! { +! stp->st_score = new_sug.st_score; +! stp->st_altscore = new_sug.st_altscore; +! stp->st_had_bonus = new_sug.st_had_bonus; + } +! break; +! } + + if (i < 0 && ga_grow(gap, 1) == OK) + { +--- 13580,13637 ---- + * the first "the" to itself. */ + return; + +! if (gap->ga_len == 0) +! i = -1; +! else +! { +! /* Check if the word is already there. Also check the length that is +! * being replaced "thes," -> "these" is a different suggestion from +! * "thes" -> "these". */ +! stp = &SUG(*gap, 0); +! for (i = gap->ga_len; --i >= 0; ++stp) +! if (stp->st_wordlen == goodlen +! && stp->st_orglen == badlen +! && STRNCMP(stp->st_word, goodword, goodlen) == 0) +! { +! /* +! * Found it. Remember the word with the lowest score. +! */ +! if (stp->st_slang == NULL) +! stp->st_slang = slang; + +! new_sug.st_score = score; +! new_sug.st_altscore = altscore; +! new_sug.st_had_bonus = had_bonus; +! +! if (stp->st_had_bonus != had_bonus) +! { +! /* Only one of the two had the soundalike score computed. +! * Need to do that for the other one now, otherwise the +! * scores can't be compared. This happens because +! * suggest_try_change() doesn't compute the soundalike +! * word to keep it fast, while some special methods set +! * the soundalike score to zero. */ +! if (had_bonus) +! rescore_one(su, stp); +! else +! { +! new_sug.st_word = stp->st_word; +! new_sug.st_wordlen = stp->st_wordlen; +! new_sug.st_slang = stp->st_slang; +! new_sug.st_orglen = badlen; +! rescore_one(su, &new_sug); +! } + } + +! if (stp->st_score > new_sug.st_score) +! { +! stp->st_score = new_sug.st_score; +! stp->st_altscore = new_sug.st_altscore; +! stp->st_had_bonus = new_sug.st_had_bonus; +! } +! break; + } +! } + + if (i < 0 && ga_grow(gap, 1) == OK) + { +*** ../vim-7.0.069/src/ui.c Mon Mar 27 23:02:40 2006 +--- src/ui.c Thu Aug 24 22:31:38 2006 +*************** +*** 1137,1143 **** + int len; + #ifdef FEAT_MBYTE + char_u *p; +- int i; + #endif + int row1 = clip_star.start.lnum; + int col1 = clip_star.start.col; +--- 1137,1142 ---- +*************** +*** 1218,1223 **** +--- 1217,1224 ---- + #ifdef FEAT_MBYTE + if (enc_dbcs != 0) + { ++ int i; ++ + p = ScreenLines + LineOffset[row]; + for (i = start_col; i < end_col; ++i) + if (enc_dbcs == DBCS_JPNU && p[i] == 0x8e) +*** ../vim-7.0.069/src/undo.c Wed Jul 12 21:48:56 2006 +--- src/undo.c Thu Aug 24 22:32:41 2006 +*************** +*** 1187,1193 **** + int did_undo; /* just did an undo */ + int absolute; /* used ":undo N" */ + { +! char *msg; + u_header_T *uhp; + char_u msgbuf[80]; + +--- 1187,1193 ---- + int did_undo; /* just did an undo */ + int absolute; /* used ":undo N" */ + { +! char *msgstr; + u_header_T *uhp; + char_u msgbuf[80]; + +*************** +*** 1205,1224 **** + + u_oldcount -= u_newcount; + if (u_oldcount == -1) +! msg = N_("more line"); + else if (u_oldcount < 0) +! msg = N_("more lines"); + else if (u_oldcount == 1) +! msg = N_("line less"); + else if (u_oldcount > 1) +! msg = N_("fewer lines"); + else + { + u_oldcount = u_newcount; + if (u_newcount == 1) +! msg = N_("change"); + else +! msg = N_("changes"); + } + + if (curbuf->b_u_curhead != NULL) +--- 1205,1224 ---- + + u_oldcount -= u_newcount; + if (u_oldcount == -1) +! msgstr = N_("more line"); + else if (u_oldcount < 0) +! msgstr = N_("more lines"); + else if (u_oldcount == 1) +! msgstr = N_("line less"); + else if (u_oldcount > 1) +! msgstr = N_("fewer lines"); + else + { + u_oldcount = u_newcount; + if (u_newcount == 1) +! msgstr = N_("change"); + else +! msgstr = N_("changes"); + } + + if (curbuf->b_u_curhead != NULL) +*************** +*** 1244,1250 **** + + smsg((char_u *)_("%ld %s; %s #%ld %s"), + u_oldcount < 0 ? -u_oldcount : u_oldcount, +! _(msg), + did_undo ? _("before") : _("after"), + uhp == NULL ? 0L : uhp->uh_seq, + msgbuf); +--- 1244,1250 ---- + + smsg((char_u *)_("%ld %s; %s #%ld %s"), + u_oldcount < 0 ? -u_oldcount : u_oldcount, +! _(msgstr), + did_undo ? _("before") : _("after"), + uhp == NULL ? 0L : uhp->uh_seq, + msgbuf); +*** ../vim-7.0.069/src/window.c Sat May 6 23:37:40 2006 +--- src/window.c Thu Aug 24 22:33:40 2006 +*************** +*** 340,349 **** + { + tabpage_T *oldtab = curtab; + tabpage_T *newtab; +- win_T *wp = curwin; + + /* First create a new tab with the window, then go back to + * the old tab and close the window there. */ + if (win_new_tabpage((int)Prenum) == OK + && valid_tabpage(oldtab)) + { +--- 340,349 ---- + { + tabpage_T *oldtab = curtab; + tabpage_T *newtab; + + /* First create a new tab with the window, then go back to + * the old tab and close the window there. */ ++ wp = curwin; + if (win_new_tabpage((int)Prenum) == OK + && valid_tabpage(oldtab)) + { +*** ../vim-7.0.069/src/version.c Tue Aug 29 16:52:01 2006 +--- src/version.c Tue Aug 29 17:02:00 2006 +*************** +*** 668,669 **** +--- 668,671 ---- + { /* Add new patch number below this line */ ++ /**/ ++ 70, + /**/ + +-- +hundred-and-one symptoms of being an internet addict: +267. You get an extra phone line so you can get phone calls. + + /// Bram Moolenaar -- Bram@Moolenaar.net -- http://www.Moolenaar.net \\\ +/// sponsor Vim, vote for features -- http://www.Vim.org/sponsor/ \\\ +\\\ download, build and distribute -- http://www.A-A-P.org /// + \\\ help me help AIDS victims -- http://ICCF-Holland.org /// --- vim-7.0.orig/upstream/patches/7.0.030 +++ vim-7.0/upstream/patches/7.0.030 @@ -0,0 +1,52 @@ +To: vim-dev@vim.org +Subject: Patch 7.0.030 +Fcc: outbox +From: Bram Moolenaar +Mime-Version: 1.0 +Content-Type: text/plain; charset=ISO-8859-1 +Content-Transfer-Encoding: 8bit +------------ + +Patch 7.0.030 +Problem: The ":compiler" command can't be used in a FileChangedRO event. + (Hari Krishna Dara) +Solution: Add the CMDWIN flag to the ":compiler" command. +Files: src/ex_cmds.h + + +*** ../vim-7.0.029/src/ex_cmds.h Fri Apr 7 23:40:07 2006 +--- src/ex_cmds.h Sun Jun 18 22:44:01 2006 +*************** +*** 262,268 **** + EX(CMD_comclear, "comclear", ex_comclear, + TRLBAR|CMDWIN), + EX(CMD_compiler, "compiler", ex_compiler, +! BANG|TRLBAR|WORD1), + EX(CMD_continue, "continue", ex_continue, + TRLBAR|SBOXOK|CMDWIN), + EX(CMD_confirm, "confirm", ex_wrongmodifier, +--- 262,268 ---- + EX(CMD_comclear, "comclear", ex_comclear, + TRLBAR|CMDWIN), + EX(CMD_compiler, "compiler", ex_compiler, +! BANG|TRLBAR|WORD1|CMDWIN), + EX(CMD_continue, "continue", ex_continue, + TRLBAR|SBOXOK|CMDWIN), + EX(CMD_confirm, "confirm", ex_wrongmodifier, +*** ../vim-7.0.029/src/version.c Thu Jun 22 21:01:19 2006 +--- src/version.c Thu Jun 22 21:08:12 2006 +*************** +*** 668,669 **** +--- 668,671 ---- + { /* Add new patch number below this line */ ++ /**/ ++ 30, + /**/ + +-- +Every person is responsible for the choices he makes. + + /// Bram Moolenaar -- Bram@Moolenaar.net -- http://www.Moolenaar.net \\\ +/// sponsor Vim, vote for features -- http://www.Vim.org/sponsor/ \\\ +\\\ download, build and distribute -- http://www.A-A-P.org /// + \\\ help me help AIDS victims -- http://ICCF-Holland.org /// --- vim-7.0.orig/upstream/patches/7.0.133 +++ vim-7.0/upstream/patches/7.0.133 @@ -0,0 +1,93 @@ +To: vim-dev@vim.org +Subject: Patch 7.0.133 +Fcc: outbox +From: Bram Moolenaar +Mime-Version: 1.0 +Content-Type: text/plain; charset=ISO-8859-1 +Content-Transfer-Encoding: 8bit +------------ + +Patch 7.0.133 +Problem: When searching included files messages are added to the history. +Solution: Set msg_hist_off for messages about scanning included files. + Set msg_silent to avoid message about wrapping around. +Files: src/edit.c, src/globals.h, src/message.c, src/search.c + + +*** ../vim-7.0.132/src/edit.c Tue Oct 10 15:49:41 2006 +--- src/edit.c Sat Oct 14 14:22:09 2006 +*************** +*** 3909,3914 **** +--- 3909,3916 ---- + { + int flags = 0; + ++ ++msg_silent; /* Don't want messages for wrapscan. */ ++ + /* ctrl_x_mode == CTRL_X_WHOLE_LINE || word-wise search that + * has added a word that was at the beginning of the line */ + if ( ctrl_x_mode == CTRL_X_WHOLE_LINE +*************** +*** 3920,3925 **** +--- 3922,3928 ---- + compl_direction, + compl_pattern, 1L, SEARCH_KEEP + SEARCH_NFMSG, + RE_LAST, (linenr_T)0); ++ --msg_silent; + if (!compl_started) + { + /* set "compl_started" even on fail */ +*** ../vim-7.0.132/src/globals.h Tue Sep 5 12:57:14 2006 +--- src/globals.h Sat Oct 14 14:05:02 2006 +*************** +*** 166,171 **** +--- 166,172 ---- + EXTERN int emsg_off INIT(= 0); /* don't display errors for now, + unless 'debug' is set. */ + EXTERN int info_message INIT(= FALSE); /* printing informative message */ ++ EXTERN int msg_hist_off INIT(= FALSE); /* don't add messages to history */ + #ifdef FEAT_EVAL + EXTERN int emsg_skip INIT(= 0); /* don't display errors for + expression that is skipped */ +*** ../vim-7.0.132/src/message.c Tue Oct 3 17:21:04 2006 +--- src/message.c Sat Oct 14 14:03:58 2006 +*************** +*** 53,59 **** + static struct msg_hist *first_msg_hist = NULL; + static struct msg_hist *last_msg_hist = NULL; + static int msg_hist_len = 0; +- static int msg_hist_off = FALSE; /* don't add messages to history */ + + /* + * When writing messages to the screen, there are many different situations. +--- 53,58 ---- +*** ../vim-7.0.132/src/search.c Tue Aug 29 18:01:39 2006 +--- src/search.c Sat Oct 14 14:15:26 2006 +*************** +*** 4688,4693 **** +--- 4688,4694 ---- + #ifdef FEAT_INS_EXPAND + if (action == ACTION_EXPAND) + { ++ msg_hist_off = TRUE; /* reset in msg_trunc_attr() */ + vim_snprintf((char*)IObuff, IOSIZE, + _("Scanning included file: %s"), + (char *)new_fname); +*** ../vim-7.0.132/src/version.c Thu Oct 12 21:15:04 2006 +--- src/version.c Sat Oct 14 14:32:31 2006 +*************** +*** 668,669 **** +--- 668,671 ---- + { /* Add new patch number below this line */ ++ /**/ ++ 133, + /**/ + +-- +You have the right to remain silent. Anything you say will be +misquoted, then used against you. + + /// Bram Moolenaar -- Bram@Moolenaar.net -- http://www.Moolenaar.net \\\ +/// sponsor Vim, vote for features -- http://www.Vim.org/sponsor/ \\\ +\\\ download, build and distribute -- http://www.A-A-P.org /// + \\\ help me help AIDS victims -- http://ICCF-Holland.org /// --- vim-7.0.orig/upstream/patches/7.0.092 +++ vim-7.0/upstream/patches/7.0.092 @@ -0,0 +1,104 @@ +To: vim-dev@vim.org +Subject: Patch 7.0.092 +Fcc: outbox +From: Bram Moolenaar +Mime-Version: 1.0 +Content-Type: text/plain; charset=ISO-8859-1 +Content-Transfer-Encoding: 8bit +------------ + +Patch 7.0.092 (after 7.0.082 and 7.0.084) +Problem: The list of internal function arguments is obsolete now that + garbage collection is only done at the toplevel. +Solution: Remove the list of all arguments to internal functions. +Files: src/eval.c + + +*** ../vim-7.0.091/src/eval.c Wed Sep 6 22:14:42 2006 +--- src/eval.c Sat Sep 9 12:00:28 2006 +*************** +*** 248,264 **** + }; + + /* +- * Struct used to make a list of all arguments used in internal functions. +- */ +- typedef struct av_list_item_S av_list_item_T; +- struct av_list_item_S { +- av_list_item_T *avl_next; +- typval_T *avl_argvars; +- }; +- +- av_list_item_T *argvars_list = NULL; +- +- /* + * Info used by a ":for" loop. + */ + typedef struct +--- 248,253 ---- +*************** +*** 6069,6075 **** + int i; + funccall_T *fc; + int did_free = FALSE; +- av_list_item_T *av; + #ifdef FEAT_WINDOWS + tabpage_T *tp; + #endif +--- 6058,6063 ---- +*************** +*** 6110,6120 **** + set_ref_in_ht(&fc->l_avars.dv_hashtab, copyID); + } + +- /* arguments for internal functions */ +- for (av = argvars_list; av != NULL; av = av->avl_next) +- for (i = 0; av->avl_argvars[i].v_type != VAR_UNKNOWN; ++i) +- set_ref_in_item(&av->avl_argvars[i], copyID); +- + /* + * 2. Go through the list of dicts and free items without the copyID. + */ +--- 6098,6103 ---- +*************** +*** 7558,7578 **** + error = ERROR_TOOMANY; + else + { +- av_list_item_T av_list_item; +- +- /* Add the arguments to the "argvars_list" to avoid the +- * garbage collector not seeing them. This isn't needed +- * for user functions, because the arguments are available +- * in the a: hashtab. */ +- av_list_item.avl_argvars = argvars; +- av_list_item.avl_next = argvars_list; +- argvars_list = &av_list_item; +- + argvars[argcount].v_type = VAR_UNKNOWN; + functions[i].f_func(argvars, rettv); + error = ERROR_NONE; +- +- argvars_list = av_list_item.avl_next; + } + } + } +--- 7541,7549 ---- +*** ../vim-7.0.091/src/version.c Wed Sep 6 22:14:42 2006 +--- src/version.c Sat Sep 9 12:04:55 2006 +*************** +*** 668,669 **** +--- 668,671 ---- + { /* Add new patch number below this line */ ++ /**/ ++ 92, + /**/ + +-- +"Hegel was right when he said that we learn from history that man can +never learn anything from history." (George Bernard Shaw) + + /// Bram Moolenaar -- Bram@Moolenaar.net -- http://www.Moolenaar.net \\\ +/// sponsor Vim, vote for features -- http://www.Vim.org/sponsor/ \\\ +\\\ download, build and distribute -- http://www.A-A-P.org /// + \\\ help me help AIDS victims -- http://ICCF-Holland.org /// --- vim-7.0.orig/upstream/patches/7.0.110 +++ vim-7.0/upstream/patches/7.0.110 @@ -0,0 +1,88 @@ +To: vim-dev@vim.org +Subject: Patch 7.0.110 +Fcc: outbox +From: Bram Moolenaar +Mime-Version: 1.0 +Content-Type: text/plain; charset=ISO-8859-1 +Content-Transfer-Encoding: 8bit +------------ + +Patch 7.0.110 +Problem: Amiga: Compilation problems when not using libnix. +Solution: Change a few #ifdefs. (Willy Catteau) +Files: src/memfile.c + + +*** ../vim-7.0.109/src/memfile.c Tue Mar 7 00:27:12 2006 +--- src/memfile.c Sun Sep 17 15:50:00 2006 +*************** +*** 517,523 **** + mf_ins_free(mfp, hp); /* put *hp in the free list */ + } + +! #if defined(__MORPHOS__) + /* function is missing in MorphOS libnix version */ + extern unsigned long *__stdfiledes; + +--- 517,523 ---- + mf_ins_free(mfp, hp); /* put *hp in the free list */ + } + +! #if defined(__MORPHOS__) && defined(__libnix__) + /* function is missing in MorphOS libnix version */ + extern unsigned long *__stdfiledes; + +*************** +*** 677,691 **** + # else + # if defined(_DCC) || defined(__GNUC__) || defined(__MORPHOS__) + { +! # if defined(__GNUC__) && !defined(__MORPHOS__) + /* Have function (in libnix at least), + * but ain't got no prototype anywhere. */ + extern unsigned long fdtofh(int filedescriptor); + # endif + BPTR fh = (BPTR)fdtofh(mfp->mf_fd); + + if (fh != 0) + Flush(fh); + } + # else /* assume Manx */ + Flush(_devtab[mfp->mf_fd].fd); +--- 677,695 ---- + # else + # if defined(_DCC) || defined(__GNUC__) || defined(__MORPHOS__) + { +! # if defined(__GNUC__) && !defined(__MORPHOS__) && defined(__libnix__) + /* Have function (in libnix at least), + * but ain't got no prototype anywhere. */ + extern unsigned long fdtofh(int filedescriptor); + # endif ++ # if !defined(__libnix__) ++ fflush(NULL); ++ # else + BPTR fh = (BPTR)fdtofh(mfp->mf_fd); + + if (fh != 0) + Flush(fh); ++ # endif + } + # else /* assume Manx */ + Flush(_devtab[mfp->mf_fd].fd); +*** ../vim-7.0.109/src/version.c Fri Sep 15 20:17:49 2006 +--- src/version.c Tue Sep 26 13:48:48 2006 +*************** +*** 668,669 **** +--- 668,671 ---- + { /* Add new patch number below this line */ ++ /**/ ++ 110, + /**/ + +-- +A fool must search for a greater fool to find admiration. + + /// Bram Moolenaar -- Bram@Moolenaar.net -- http://www.Moolenaar.net \\\ +/// sponsor Vim, vote for features -- http://www.Vim.org/sponsor/ \\\ +\\\ download, build and distribute -- http://www.A-A-P.org /// + \\\ help me help AIDS victims -- http://ICCF-Holland.org /// --- vim-7.0.orig/upstream/patches/7.0.076 +++ vim-7.0/upstream/patches/7.0.076 @@ -0,0 +1,76 @@ +To: vim-dev@vim.org +Subject: Patch 7.0.076 +Fcc: outbox +From: Bram Moolenaar +Mime-Version: 1.0 +Content-Type: text/plain; charset=ISO-8859-1 +Content-Transfer-Encoding: 8bit +------------ + +Patch 7.0.076 (after 7.0.010) +Problem: Automatic downloading of spell files only works for ftp. +Solution: Don't add login and password for non-ftp URLs. (Alexander Patrakov) +Files: runtime/autoload/spellfile.vim + + +*** ../vim-7.0.075/runtime/autoload/spellfile.vim Sat May 13 14:29:16 2006 +--- runtime/autoload/spellfile.vim Tue Aug 29 22:17:03 2006 +*************** +*** 1,6 **** + " Vim script to download a missing spell file + " Maintainer: Bram Moolenaar +! " Last Change: 2006 May 10 + + if !exists('g:spellfile_URL') + let g:spellfile_URL = 'ftp://ftp.vim.org/pub/vim/runtime/spell' +--- 1,6 ---- + " Vim script to download a missing spell file + " Maintainer: Bram Moolenaar +! " Last Change: 2006 Aug 29 + + if !exists('g:spellfile_URL') + let g:spellfile_URL = 'ftp://ftp.vim.org/pub/vim/runtime/spell' +*************** +*** 110,118 **** + endif + endfunc + +! " Read "fname" from the ftp server. + function! spellfile#Nread(fname) +! let machine = substitute(g:spellfile_URL, 'ftp://\([^/]*\).*', '\1', '') +! let dir = substitute(g:spellfile_URL, 'ftp://[^/]*/\(.*\)', '\1', '') +! exe 'Nread "' . machine . ' anonymous vim7user ' . dir . '/' . a:fname . '"' + endfunc +--- 110,123 ---- + endif + endfunc + +! " Read "fname" from the server. + function! spellfile#Nread(fname) +! if g:spellfile_URL =~ '^ftp://' +! " for an ftp server use a default login and password to avoid a prompt +! let machine = substitute(g:spellfile_URL, 'ftp://\([^/]*\).*', '\1', '') +! let dir = substitute(g:spellfile_URL, 'ftp://[^/]*/\(.*\)', '\1', '') +! exe 'Nread "' . machine . ' anonymous vim7user ' . dir . '/' . a:fname . '"' +! else +! exe 'Nread ' g:spellfile_URL . '/' . a:fname +! endif + endfunc +*** ../vim-7.0.075/src/version.c Tue Aug 29 21:59:25 2006 +--- src/version.c Tue Aug 29 22:31:45 2006 +*************** +*** 668,669 **** +--- 668,671 ---- + { /* Add new patch number below this line */ ++ /**/ ++ 76, + /**/ + +-- +This sentence is not sure that it exists, but if it does, it will +certainly consider the possibility that other sentences exist. + + /// Bram Moolenaar -- Bram@Moolenaar.net -- http://www.Moolenaar.net \\\ +/// sponsor Vim, vote for features -- http://www.Vim.org/sponsor/ \\\ +\\\ download, build and distribute -- http://www.A-A-P.org /// + \\\ help me help AIDS victims -- http://ICCF-Holland.org /// --- vim-7.0.orig/upstream/patches/7.0.157 +++ vim-7.0/upstream/patches/7.0.157 @@ -0,0 +1,105 @@ +To: vim-dev@vim.org +Subject: Patch 7.0.157 +Fcc: outbox +From: Bram Moolenaar +Mime-Version: 1.0 +Content-Type: text/plain; charset=ISO-8859-1 +Content-Transfer-Encoding: 8bit +------------ + +Patch 7.0.157 +Problem: When a function is used recursively the profiling information is + invalid. (Mikolaj Machowski) +Solution: Put the start time on the stack instead of in the function. +Files: src/eval.c + + +*** ../vim-7.0.156/src/eval.c Wed Nov 1 15:31:02 2006 +--- src/eval.c Wed Nov 1 13:39:52 2006 +*************** +*** 166,172 **** + int uf_tm_count; /* nr of calls */ + proftime_T uf_tm_total; /* time spend in function + children */ + proftime_T uf_tm_self; /* time spend in function itself */ +- proftime_T uf_tm_start; /* time at function call */ + proftime_T uf_tm_children; /* time spent in children this call */ + /* profiling the function per line */ + int *uf_tml_count; /* nr of times line was executed */ +--- 166,171 ---- +*************** +*** 19764,19769 **** +--- 19763,19769 ---- + char_u *name; + #ifdef FEAT_PROFILE + proftime_T wait_start; ++ proftime_T call_start; + #endif + + /* If depth of calling is getting too high, don't execute the function */ +*************** +*** 19943,19949 **** + || (fc.caller != NULL && &fc.caller->func->uf_profiling)) + { + ++fp->uf_tm_count; +! profile_start(&fp->uf_tm_start); + profile_zero(&fp->uf_tm_children); + } + script_prof_save(&wait_start); +--- 19943,19949 ---- + || (fc.caller != NULL && &fc.caller->func->uf_profiling)) + { + ++fp->uf_tm_count; +! profile_start(&call_start); + profile_zero(&fp->uf_tm_children); + } + script_prof_save(&wait_start); +*************** +*** 19973,19986 **** + if (do_profiling == PROF_YES && (fp->uf_profiling + || (fc.caller != NULL && &fc.caller->func->uf_profiling))) + { +! profile_end(&fp->uf_tm_start); +! profile_sub_wait(&wait_start, &fp->uf_tm_start); +! profile_add(&fp->uf_tm_total, &fp->uf_tm_start); +! profile_self(&fp->uf_tm_self, &fp->uf_tm_start, &fp->uf_tm_children); + if (fc.caller != NULL && &fc.caller->func->uf_profiling) + { +! profile_add(&fc.caller->func->uf_tm_children, &fp->uf_tm_start); +! profile_add(&fc.caller->func->uf_tml_children, &fp->uf_tm_start); + } + } + #endif +--- 19973,19986 ---- + if (do_profiling == PROF_YES && (fp->uf_profiling + || (fc.caller != NULL && &fc.caller->func->uf_profiling))) + { +! profile_end(&call_start); +! profile_sub_wait(&wait_start, &call_start); +! profile_add(&fp->uf_tm_total, &call_start); +! profile_self(&fp->uf_tm_self, &call_start, &fp->uf_tm_children); + if (fc.caller != NULL && &fc.caller->func->uf_profiling) + { +! profile_add(&fc.caller->func->uf_tm_children, &call_start); +! profile_add(&fc.caller->func->uf_tml_children, &call_start); + } + } + #endif +*** ../vim-7.0.156/src/version.c Wed Nov 1 18:10:36 2006 +--- src/version.c Wed Nov 1 18:32:42 2006 +*************** +*** 668,669 **** +--- 668,671 ---- + { /* Add new patch number below this line */ ++ /**/ ++ 157, + /**/ + +-- +hundred-and-one symptoms of being an internet addict: +140. You'd rather catch a score on the web than watch the game as + it is being played on tv. + + /// Bram Moolenaar -- Bram@Moolenaar.net -- http://www.Moolenaar.net \\\ +/// sponsor Vim, vote for features -- http://www.Vim.org/sponsor/ \\\ +\\\ download, build and distribute -- http://www.A-A-P.org /// + \\\ help me help AIDS victims -- http://ICCF-Holland.org /// --- vim-7.0.orig/upstream/patches/7.0.162 +++ vim-7.0/upstream/patches/7.0.162 @@ -0,0 +1,200 @@ +To: vim-dev@vim.org +Subject: Patch 7.0.162 +Fcc: outbox +From: Bram Moolenaar +Mime-Version: 1.0 +Content-Type: text/plain; charset=ISO-8859-1 +Content-Transfer-Encoding: 8bit +------------ + +Patch 7.0.162 +Problem: "vim -o a b" when file "a" triggers the ATTENTION dialog, + selecting "Quit" exits Vim instead of editing "b" only. + When file "b" triggers the ATTENTION dialog selecting "Quit" or + "Abort" results in editing file "a" in that window. +Solution: When selecting "Abort" exit Vim. When selecting "Quit" close the + window. Also avoid hit-enter prompt when selecting Abort. +Files: src/buffer.c, src/main.c + + +*** ../vim-7.0.161/src/buffer.c Fri Oct 20 20:15:05 2006 +--- src/buffer.c Tue Nov 7 21:08:02 2006 +*************** +*** 4220,4226 **** + + /* Use the name from the associated buffer if it exists. */ + bp = buflist_findnr(aep->ae_fnum); +! if (bp == NULL) + return aep->ae_fname; + return bp->b_fname; + } +--- 4222,4228 ---- + + /* Use the name from the associated buffer if it exists. */ + bp = buflist_findnr(aep->ae_fnum); +! if (bp == NULL || bp->b_fname == NULL) + return aep->ae_fname; + return bp->b_fname; + } +*** ../vim-7.0.161/src/main.c Tue Sep 5 12:57:14 2006 +--- src/main.c Tue Nov 7 22:35:49 2006 +*************** +*** 2392,2398 **** + (void)open_buffer(FALSE, NULL); /* create memfile, read file */ + + #if defined(HAS_SWAP_EXISTS_ACTION) +! check_swap_exists_action(); + #endif + #ifdef FEAT_AUTOCMD + dorewind = TRUE; /* start again */ +--- 2392,2414 ---- + (void)open_buffer(FALSE, NULL); /* create memfile, read file */ + + #if defined(HAS_SWAP_EXISTS_ACTION) +! if (swap_exists_action == SEA_QUIT) +! { +! if (got_int || only_one_window()) +! { +! /* abort selected or quit and only one window */ +! did_emsg = FALSE; /* avoid hit-enter prompt */ +! getout(1); +! } +! /* We can't close the window, it would disturb what +! * happens next. Clear the file name and set the arg +! * index to -1 to delete it later. */ +! setfname(curbuf, NULL, NULL, FALSE); +! curwin->w_arg_idx = -1; +! swap_exists_action = SEA_NONE; +! } +! else +! handle_swap_exists(NULL); + #endif + #ifdef FEAT_AUTOCMD + dorewind = TRUE; /* start again */ +*************** +*** 2432,2437 **** +--- 2448,2455 ---- + { + int arg_idx; /* index in argument list */ + int i; ++ int advance = TRUE; ++ buf_T *old_curbuf; + + # ifdef FEAT_AUTOCMD + /* +*************** +*** 2440,2470 **** + ++autocmd_no_enter; + ++autocmd_no_leave; + # endif + arg_idx = 1; + for (i = 1; i < parmp->window_count; ++i) + { +! if (parmp->window_layout == WIN_TABS) + { +! if (curtab->tp_next == NULL) /* just checking */ +! break; +! goto_tabpage(0); + } +! else + { +! if (curwin->w_next == NULL) /* just checking */ +! break; +! win_enter(curwin->w_next, FALSE); + } + + /* Only open the file if there is no file in this window yet (that can +! * happen when .vimrc contains ":sall") */ + if (curbuf == firstwin->w_buffer || curbuf->b_ffname == NULL) + { + curwin->w_arg_idx = arg_idx; +! /* edit file from arg list, if there is one */ + (void)do_ecmd(0, arg_idx < GARGCOUNT + ? alist_name(&GARGLIST[arg_idx]) : NULL, + NULL, NULL, ECMD_LASTL, ECMD_HIDE); + if (arg_idx == GARGCOUNT - 1) + arg_had_last = TRUE; + ++arg_idx; +--- 2458,2522 ---- + ++autocmd_no_enter; + ++autocmd_no_leave; + # endif ++ ++ /* When w_arg_idx is -1 remove the window (see create_windows()). */ ++ if (curwin->w_arg_idx == -1) ++ { ++ win_close(curwin, TRUE); ++ advance = FALSE; ++ } ++ + arg_idx = 1; + for (i = 1; i < parmp->window_count; ++i) + { +! /* When w_arg_idx is -1 remove the window (see create_windows()). */ +! if (curwin->w_arg_idx == -1) + { +! ++arg_idx; +! win_close(curwin, TRUE); +! advance = FALSE; +! continue; + } +! +! if (advance) + { +! if (parmp->window_layout == WIN_TABS) +! { +! if (curtab->tp_next == NULL) /* just checking */ +! break; +! goto_tabpage(0); +! } +! else +! { +! if (curwin->w_next == NULL) /* just checking */ +! break; +! win_enter(curwin->w_next, FALSE); +! } + } ++ advance = TRUE; + + /* Only open the file if there is no file in this window yet (that can +! * happen when .vimrc contains ":sall"). */ + if (curbuf == firstwin->w_buffer || curbuf->b_ffname == NULL) + { + curwin->w_arg_idx = arg_idx; +! /* Edit file from arg list, if there is one. When "Quit" selected +! * at the ATTENTION prompt close the window. */ +! old_curbuf = curbuf; + (void)do_ecmd(0, arg_idx < GARGCOUNT + ? alist_name(&GARGLIST[arg_idx]) : NULL, + NULL, NULL, ECMD_LASTL, ECMD_HIDE); ++ if (curbuf == old_curbuf) ++ { ++ if (got_int || only_one_window()) ++ { ++ /* abort selected or quit and only one window */ ++ did_emsg = FALSE; /* avoid hit-enter prompt */ ++ getout(1); ++ } ++ win_close(curwin, TRUE); ++ advance = FALSE; ++ } + if (arg_idx == GARGCOUNT - 1) + arg_had_last = TRUE; + ++arg_idx; +*** ../vim-7.0.161/src/version.c Tue Nov 7 19:05:36 2006 +--- src/version.c Tue Nov 7 21:21:28 2006 +*************** +*** 668,669 **** +--- 668,671 ---- + { /* Add new patch number below this line */ ++ /**/ ++ 162, + /**/ + +-- +The CIA drives around in cars with the "Intel inside" logo. + + /// Bram Moolenaar -- Bram@Moolenaar.net -- http://www.Moolenaar.net \\\ +/// sponsor Vim, vote for features -- http://www.Vim.org/sponsor/ \\\ +\\\ download, build and distribute -- http://www.A-A-P.org /// + \\\ help me help AIDS victims -- http://ICCF-Holland.org /// --- vim-7.0.orig/upstream/patches/7.0.118 +++ vim-7.0/upstream/patches/7.0.118 @@ -0,0 +1,49 @@ +To: vim-dev@vim.org +Subject: Patch 7.0.118 +Fcc: outbox +From: Bram Moolenaar +Mime-Version: 1.0 +Content-Type: text/plain; charset=ISO-8859-1 +Content-Transfer-Encoding: 8bit +------------ + +Patch 7.0.118 +Problem: printf() does not do zero padding for strings. +Solution: Do allow zero padding for strings. +Files: src/message.c + + +*** ../vim-7.0.117/src/message.c Sun Sep 3 16:39:51 2006 +--- src/message.c Tue Oct 3 15:41:44 2006 +*************** +*** 4124,4131 **** + case 'c': + case 's': + length_modifier = '\0'; +- zero_padding = 0; /* turn zero padding off for string +- conversions */ + str_arg_l = 1; + switch (fmt_spec) + { +--- 4124,4129 ---- +*** ../vim-7.0.117/src/version.c Tue Oct 3 17:04:21 2006 +--- src/version.c Tue Oct 3 17:20:11 2006 +*************** +*** 668,669 **** +--- 668,671 ---- + { /* Add new patch number below this line */ ++ /**/ ++ 118, + /**/ + +-- +While it's true that many normal people whould prefer not to _date_ an +engineer, most normal people harbor an intense desire to _mate_ with them, +thus producing engineerlike children who will have high-paying jobs long +before losing their virginity. + (Scott Adams - The Dilbert principle) + + /// Bram Moolenaar -- Bram@Moolenaar.net -- http://www.Moolenaar.net \\\ +/// sponsor Vim, vote for features -- http://www.Vim.org/sponsor/ \\\ +\\\ download, build and distribute -- http://www.A-A-P.org /// + \\\ help me help AIDS victims -- http://ICCF-Holland.org /// --- vim-7.0.orig/upstream/patches/7.0.142 +++ vim-7.0/upstream/patches/7.0.142 @@ -0,0 +1,70 @@ +To: vim-dev@vim.org +Subject: Patch 7.0.142 +Fcc: outbox +From: Bram Moolenaar +Mime-Version: 1.0 +Content-Type: text/plain; charset=ISO-8859-1 +Content-Transfer-Encoding: 8bit +------------ + +Patch 7.0.142 +Problem: Using the middle mouse button in Select mode to paste text results + in an extra "y". (Kriton Kyrimis) +Solution: Let the middle mouse button replace the selected text with the + contents of the clipboard. +Files: src/normal.c + + +*** ../vim-7.0.141/src/normal.c Tue Oct 10 13:27:30 2006 +--- src/normal.c Tue Oct 17 16:54:57 2006 +*************** +*** 2380,2390 **** + /* + * If visual was active, yank the highlighted text and put it + * before the mouse pointer position. + */ + if (VIsual_active) + { +! stuffcharReadbuff('y'); +! stuffcharReadbuff(K_MIDDLEMOUSE); + do_always = TRUE; /* ignore 'mouse' setting next time */ + return FALSE; + } +--- 2380,2399 ---- + /* + * If visual was active, yank the highlighted text and put it + * before the mouse pointer position. ++ * In Select mode replace the highlighted text with the clipboard. + */ + if (VIsual_active) + { +! if (VIsual_select) +! { +! stuffcharReadbuff(Ctrl_G); +! stuffReadbuff("\"+p"); +! } +! else +! { +! stuffcharReadbuff('y'); +! stuffcharReadbuff(K_MIDDLEMOUSE); +! } + do_always = TRUE; /* ignore 'mouse' setting next time */ + return FALSE; + } +*** ../vim-7.0.141/src/version.c Tue Oct 17 16:26:52 2006 +--- src/version.c Tue Oct 17 16:51:23 2006 +*************** +*** 668,669 **** +--- 668,671 ---- + { /* Add new patch number below this line */ ++ /**/ ++ 142, + /**/ + +-- +Keyboard not found. Think ENTER to continue. + + /// Bram Moolenaar -- Bram@Moolenaar.net -- http://www.Moolenaar.net \\\ +/// sponsor Vim, vote for features -- http://www.Vim.org/sponsor/ \\\ +\\\ download, build and distribute -- http://www.A-A-P.org /// + \\\ help me help AIDS victims -- http://ICCF-Holland.org /// --- vim-7.0.orig/upstream/patches/7.0.058 +++ vim-7.0/upstream/patches/7.0.058 @@ -0,0 +1,46 @@ +To: vim-dev@vim.org +Subject: Patch 7.0.058 +Fcc: outbox +From: Bram Moolenaar +Mime-Version: 1.0 +Content-Type: text/plain; charset=ISO-8859-1 +Content-Transfer-Encoding: 8bit +------------ + +Patch 7.0.058 +Problem: The gbk and and gb18030 encodings are not recognized. +Solution: Add aliases to cp936. (Edward L. Fox) +Files: src/mbyte.c + + +*** ../vim-7.0.057/src/mbyte.c Sat May 13 17:10:00 2006 +--- src/mbyte.c Sat Aug 12 22:59:55 2006 +*************** +*** 363,368 **** +--- 363,370 ---- + {"932", IDX_CP932}, + {"949", IDX_CP949}, + {"936", IDX_CP936}, ++ {"gbk", IDX_CP936}, ++ {"gb18030", IDX_CP936}, /* only 99% the same */ + {"950", IDX_CP950}, + {"eucjp", IDX_EUC_JP}, + {"unix-jis", IDX_EUC_JP}, +*** ../vim-7.0.057/src/version.c Wed Aug 16 17:36:21 2006 +--- src/version.c Wed Aug 16 18:04:14 2006 +*************** +*** 668,669 **** +--- 668,671 ---- + { /* Add new patch number below this line */ ++ /**/ ++ 58, + /**/ + +-- +hundred-and-one symptoms of being an internet addict: +162. You go outside and look for a brightness knob to turn down the sun. + + /// Bram Moolenaar -- Bram@Moolenaar.net -- http://www.Moolenaar.net \\\ +/// sponsor Vim, vote for features -- http://www.Vim.org/sponsor/ \\\ +\\\ download, build and distribute -- http://www.A-A-P.org /// + \\\ help me help AIDS victims -- http://ICCF-Holland.org /// --- vim-7.0.orig/upstream/patches/7.0.024 +++ vim-7.0/upstream/patches/7.0.024 @@ -0,0 +1,53 @@ +To: vim-dev@vim.org +Subject: Patch 7.0.024 +Fcc: outbox +From: Bram Moolenaar +Mime-Version: 1.0 +Content-Type: text/plain; charset=ISO-8859-1 +Content-Transfer-Encoding: 8bit +------------ + +Patch 7.0.024 +Problem: It is possible to set arbitrary "v:" variables. +Solution: Disallow setting "v:" variables that are not predefined. +Files: src/eval.c + + +*** ../vim-7.0.023/src/eval.c Sat May 13 13:36:47 2006 +--- src/eval.c Thu Jun 22 17:27:51 2006 +*************** +*** 17759,17764 **** +--- 17763,17775 ---- + } + else /* add a new variable */ + { ++ /* Can't add "v:" variable. */ ++ if (ht == &vimvarht) ++ { ++ EMSG2(_(e_illvar), name); ++ return; ++ } ++ + /* Make sure the variable name is valid. */ + for (p = varname; *p != NUL; ++p) + if (!eval_isnamec1(*p) && (p == varname || !VIM_ISDIGIT(*p)) +*** ../vim-7.0.023/src/version.c Thu Jun 22 16:48:43 2006 +--- src/version.c Thu Jun 22 17:30:59 2006 +*************** +*** 668,669 **** +--- 668,671 ---- + { /* Add new patch number below this line */ ++ /**/ ++ 24, + /**/ + +-- +ARTHUR: No, hang on! Just answer the five questions ... +GALAHAD: Three questions ... +ARTHUR: Three questions ... And we shall watch ... and pray. + "Monty Python and the Holy Grail" PYTHON (MONTY) PICTURES LTD + + /// Bram Moolenaar -- Bram@Moolenaar.net -- http://www.Moolenaar.net \\\ +/// sponsor Vim, vote for features -- http://www.Vim.org/sponsor/ \\\ +\\\ download, build and distribute -- http://www.A-A-P.org /// + \\\ help me help AIDS victims -- http://ICCF-Holland.org /// --- vim-7.0.orig/upstream/patches/7.0.130 +++ vim-7.0/upstream/patches/7.0.130 @@ -0,0 +1,169 @@ +To: vim-dev@vim.org +Subject: Patch 7.0.130 +Fcc: outbox +From: Bram Moolenaar +Mime-Version: 1.0 +Content-Type: text/plain; charset=ISO-8859-1 +Content-Transfer-Encoding: 8bit +------------ + +Patch 7.0.130 (extra) +Problem: Win32: Trying to edit or write devices may cause Vim to get stuck. +Solution: Add the 'opendevice' option, default off. Disallow + reading/writing from/to devices when it's off. + Also detect more devices by the full name starting with "\\.\". +Files: runtime/doc/options.txt, src/fileio.c, src/option.c, src/option.h, + src/os_win32.c + + +*** ../vim-7.0.129/runtime/doc/options.txt Sun May 7 17:07:10 2006 +--- runtime/doc/options.txt Tue Oct 10 17:34:48 2006 +*************** +*** 4792,4801 **** + completion with CTRL-X CTRL-O. |i_CTRL-X_CTRL-O| + See |complete-functions| for an explanation of how the function is + invoked and what it should return. +! This option is usually set by a filetype plugin. + |:filetype-plugin-on| + + + *'operatorfunc'* *'opfunc'* + 'operatorfunc' 'opfunc' string (default: empty) + global +--- 4815,4836 ---- + completion with CTRL-X CTRL-O. |i_CTRL-X_CTRL-O| + See |complete-functions| for an explanation of how the function is + invoked and what it should return. +! This option is usually set by a filetype plugin: + |:filetype-plugin-on| + + ++ *'opendevice* *'odev* *'noopendevice* *'noodev* ++ 'opendevice' 'odev' boolean (default off) ++ global ++ {not in Vi} ++ {only for MS-DOS, MS-Windows and OS/2} ++ Enable reading and writing from devices. This may get Vim stuck on a ++ device that can be opened but doesn't actually do the I/O. Therefore ++ it is off by default. ++ Note that on MS-Windows editing "aux.h", "lpt1.txt" and the like also ++ result in editing a device. ++ ++ + *'operatorfunc'* *'opfunc'* + 'operatorfunc' 'opfunc' string (default: empty) + global +*** ../vim-7.0.129/src/fileio.c Thu Sep 14 11:07:08 2006 +--- src/fileio.c Tue Oct 10 18:41:24 2006 +*************** +*** 419,424 **** +--- 419,438 ---- + } + #endif + ++ #if defined(MSDOS) || defined(MSWIN) || defined(OS2) ++ /* ++ * MS-Windows allows opening a device, but we will probably get stuck ++ * trying to read it. ++ */ ++ if (!p_odev && mch_nodetype(fname) == NODE_WRITABLE) ++ { ++ filemess(curbuf, fname, (char_u *)_("is a device (disabled with 'opendevice' option"), 0); ++ msg_end(); ++ msg_scroll = msg_save; ++ return FAIL; ++ } ++ #endif ++ + /* set default 'fileformat' */ + if (set_options) + { +*************** +*** 3163,3168 **** +--- 3177,3192 ---- + } + if (c == NODE_WRITABLE) + { ++ # if defined(MSDOS) || defined(MSWIN) || defined(OS2) ++ /* MS-Windows allows opening a device, but we will probably get stuck ++ * trying to write to it. */ ++ if (!p_odev) ++ { ++ errnum = (char_u *)"E796: "; ++ errmsg = (char_u *)_("writing to device disabled with 'opendevice' option"); ++ goto fail; ++ } ++ # endif + device = TRUE; + newfile = TRUE; + perm = -1; +*** ../vim-7.0.129/src/option.c Tue Sep 5 16:29:38 2006 +--- src/option.c Tue Oct 10 17:16:00 2006 +*************** +*** 1810,1815 **** +--- 1810,1823 ---- + {"open", NULL, P_BOOL|P_VI_DEF, + (char_u *)NULL, PV_NONE, + {(char_u *)FALSE, (char_u *)0L}}, ++ {"opendevice", "odev", P_BOOL|P_VI_DEF, ++ #if defined(MSDOS) || defined(MSWIN) || defined(OS2) ++ (char_u *)&p_odev, PV_NONE, ++ #else ++ (char_u *)NULL, PV_NONE, ++ #endif ++ {(char_u *)FALSE, (char_u *)FALSE} ++ }, + {"operatorfunc", "opfunc", P_STRING|P_VI_DEF|P_SECURE, + (char_u *)&p_opfunc, PV_NONE, + {(char_u *)"", (char_u *)0L} }, +*** ../vim-7.0.129/src/option.h Mon Apr 24 21:37:06 2006 +--- src/option.h Tue Oct 10 17:17:09 2006 +*************** +*** 618,623 **** +--- 618,626 ---- + #ifdef FEAT_MZSCHEME + EXTERN long p_mzq; /* 'mzquantum */ + #endif ++ #if defined(MSDOS) || defined(MSWIN) || defined(OS2) ++ EXTERN int p_odev; /* 'opendevice' */ ++ #endif + EXTERN char_u *p_opfunc; /* 'operatorfunc' */ + EXTERN char_u *p_para; /* 'paragraphs' */ + EXTERN int p_paste; /* 'paste' */ +*** ../vim-7.0.129/src/os_win32.c Sun Apr 23 00:24:31 2006 +--- src/os_win32.c Tue Oct 10 17:08:23 2006 +*************** +*** 2702,2707 **** +--- 2702,2713 ---- + HANDLE hFile; + int type; + ++ /* We can't open a file with a name "\\.\con" or "\\.\prn" and trying to ++ * read from it later will cause Vim to hang. Thus return NODE_WRITABLE ++ * here. */ ++ if (STRNCMP(name, "\\\\.\\", 4) == 0) ++ return NODE_WRITABLE; ++ + hFile = CreateFile(name, /* file name */ + GENERIC_WRITE, /* access mode */ + 0, /* share mode */ +*** ../vim-7.0.129/src/version.c Tue Oct 10 18:29:21 2006 +--- src/version.c Tue Oct 10 18:37:12 2006 +*************** +*** 668,669 **** +--- 668,671 ---- + { /* Add new patch number below this line */ ++ /**/ ++ 130, + /**/ + +-- +"Space is big. Really big. You just won't believe how vastly hugely mind- +bogglingly big it is. I mean, you may think it's a long way down the +road to the chemist, but that's just peanuts to space." + -- Douglas Adams, "The Hitchhiker's Guide to the Galaxy" + + /// Bram Moolenaar -- Bram@Moolenaar.net -- http://www.Moolenaar.net \\\ +/// sponsor Vim, vote for features -- http://www.Vim.org/sponsor/ \\\ +\\\ download, build and distribute -- http://www.A-A-P.org /// + \\\ help me help AIDS victims -- http://ICCF-Holland.org /// --- vim-7.0.orig/upstream/patches/7.0.138 +++ vim-7.0/upstream/patches/7.0.138 @@ -0,0 +1,419 @@ +To: vim-dev@vim.org +Subject: Patch 7.0.138 (extra) +Fcc: outbox +From: Bram Moolenaar +Mime-Version: 1.0 +Content-Type: text/plain; charset=ISO-8859-1 +Content-Transfer-Encoding: 8bit +------------ + +Patch 7.0.138 (extra) +Problem: Mac: modifiers don't work with function keys. +Solution: Use GetEventParameter() to obtain modifiers. (Nicolas Weber) +Files: src/gui_mac.c + + +*** ../vim-7.0.137/src/gui_mac.c Tue Aug 22 21:39:18 2006 +--- src/gui_mac.c Sun Oct 15 14:53:38 2006 +*************** +*** 2014,2020 **** + void *data) + { + /* Multibyte-friendly key event handler */ +! OSStatus e = -1; + UInt32 actualSize; + UniChar *text; + char_u result[INLINE_KEY_BUFFER_SIZE]; +--- 2014,2020 ---- + void *data) + { + /* Multibyte-friendly key event handler */ +! OSStatus err = -1; + UInt32 actualSize; + UniChar *text; + char_u result[INLINE_KEY_BUFFER_SIZE]; +*************** +*** 2022,2195 **** + UInt32 key_sym; + char charcode; + int key_char; +! UInt32 modifiers; + size_t encLen; + char_u *to = NULL; + Boolean isSpecial = FALSE; + int i; + + /* Mask the mouse (as per user setting) */ + if (p_mh) + ObscureCursor(); + +! do +! { +! /* Don't use the keys when the dialog wants them. */ +! if (dialog_busy) +! break; + +! if (noErr != GetEventParameter(theEvent, kEventParamTextInputSendText, +! typeUnicodeText, NULL, 0, &actualSize, NULL)) +! break; + +! text = (UniChar *)alloc(actualSize); + +! if (text) +! { +! do +! { +! if (noErr != GetEventParameter(theEvent, +! kEventParamTextInputSendText, +! typeUnicodeText, NULL, actualSize, NULL, text)) +! break; +! EventRef keyEvent; +! if (noErr != GetEventParameter(theEvent, +! kEventParamTextInputSendKeyboardEvent, +! typeEventRef, NULL, sizeof(EventRef), NULL, &keyEvent)) +! break; +! if (noErr != GetEventParameter(keyEvent, +! kEventParamKeyModifiers, +! typeUInt32, NULL, sizeof(UInt32), NULL, &modifiers)) +! break; +! if (noErr != GetEventParameter(keyEvent, +! kEventParamKeyCode, +! typeUInt32, NULL, sizeof(UInt32), NULL, &key_sym)) +! break; +! if (noErr != GetEventParameter(keyEvent, +! kEventParamKeyMacCharCodes, +! typeChar, NULL, sizeof(char), NULL, &charcode)) +! break; + +! key_char = charcode; + +! if (modifiers & controlKey) +! { +! if ((modifiers & ~(controlKey|shiftKey)) == 0 +! && (key_char == '2' || key_char == '6')) +! { +! /* CTRL-^ and CTRL-@ don't work in the normal way. */ +! if (key_char == '2') +! key_char = Ctrl_AT; +! else +! key_char = Ctrl_HAT; + +! text[0] = (UniChar)key_char; +! modifiers = 0; +! } +! } + +! if (modifiers & cmdKey) +! #ifndef USE_CMD_KEY +! break; /* Let system handle Cmd+... */ +! #else +! { +! /* Intercept CMD-. */ +! if (key_char == '.') +! got_int = TRUE; +! +! /* Convert the modifiers */ +! modifiers = EventModifiers2VimModifiers(modifiers); +! +! /* Following code to simplify and consolidate modifiers +! * taken liberally from gui_w48.c */ +! +! key_char = simplify_key(key_char, (int *)&modifiers); +! +! /* remove SHIFT for keys that are already shifted, e.g., +! * '(' and '*' */ +! if (key_char < 0x100 && +! !isalpha(key_char) && isprint(key_char)) +! modifiers &= ~MOD_MASK_SHIFT; +! +! /* Interpret META, include SHIFT, etc. */ +! key_char = extract_modifiers(key_char, (int *)&modifiers); +! if (key_char == CSI) +! key_char = K_CSI; + +! if (modifiers) +! { +! result[len++] = CSI; +! result[len++] = KS_MODIFIER; +! result[len++] = modifiers; +! } + +! isSpecial = TRUE; +! } +! #endif +! else +! { +! /* Find the special key (eg., for cursor keys) */ +! if (!(actualSize > sizeof(UniChar)) && +! ((text[0] < 0x20) || (text[0] == 0x7f))) +! { +! for (i = 0; special_keys[i].key_sym != (KeySym)0; ++i) +! if (special_keys[i].key_sym == key_sym) +! { +! key_char = TO_SPECIAL(special_keys[i].vim_code0, +! special_keys[i].vim_code1); +! key_char = simplify_key(key_char, +! (int *)&modifiers); +! isSpecial = TRUE; +! break; +! } +! } +! } + +! if (isSpecial && IS_SPECIAL(key_char)) +! { +! result[len++] = CSI; +! result[len++] = K_SECOND(key_char); +! result[len++] = K_THIRD(key_char); +! } +! else +! { +! encLen = actualSize; +! to = mac_utf16_to_enc(text, actualSize, &encLen); +! } + +! if (to) +! { +! /* This is basically add_to_input_buf_csi() */ +! for (i = 0; i < encLen && len < (INLINE_KEY_BUFFER_SIZE-1); ++i) +! { +! result[len++] = to[i]; +! if (to[i] == CSI) +! { +! result[len++] = KS_EXTRA; +! result[len++] = (int)KE_CSI; +! } +! } +! vim_free(to); +! } + +! add_to_input_buf(result, len); +! e = noErr; +! } +! while (0); + +! vim_free(text); +! if (e == noErr) +! { +! /* Fake event to wake up WNE (required to get +! * key repeat working */ +! PostEvent(keyUp, 0); +! return noErr; +! } +! } + } +- while (0); + +! return CallNextEventHandler(nextHandler, theEvent); + } + #else + void +--- 2022,2174 ---- + UInt32 key_sym; + char charcode; + int key_char; +! UInt32 modifiers, vimModifiers; + size_t encLen; + char_u *to = NULL; + Boolean isSpecial = FALSE; + int i; ++ EventRef keyEvent; + + /* Mask the mouse (as per user setting) */ + if (p_mh) + ObscureCursor(); + +! /* Don't use the keys when the dialog wants them. */ +! if (dialog_busy) +! return eventNotHandledErr; +! +! if (noErr != GetEventParameter(theEvent, kEventParamTextInputSendText, +! typeUnicodeText, NULL, 0, &actualSize, NULL)) +! return eventNotHandledErr; +! +! text = (UniChar *)alloc(actualSize); +! if (!text) +! return eventNotHandledErr; +! +! err = GetEventParameter(theEvent, kEventParamTextInputSendText, +! typeUnicodeText, NULL, actualSize, NULL, text); +! require_noerr(err, done); +! +! err = GetEventParameter(theEvent, kEventParamTextInputSendKeyboardEvent, +! typeEventRef, NULL, sizeof(EventRef), NULL, &keyEvent); +! require_noerr(err, done); +! +! err = GetEventParameter(keyEvent, kEventParamKeyModifiers, +! typeUInt32, NULL, sizeof(UInt32), NULL, &modifiers); +! require_noerr(err, done); +! +! err = GetEventParameter(keyEvent, kEventParamKeyCode, +! typeUInt32, NULL, sizeof(UInt32), NULL, &key_sym); +! require_noerr(err, done); +! +! err = GetEventParameter(keyEvent, kEventParamKeyMacCharCodes, +! typeChar, NULL, sizeof(char), NULL, &charcode); +! require_noerr(err, done); + +! #ifndef USE_CMD_KEY +! if (modifiers & cmdKey) +! goto done; /* Let system handle Cmd+... */ +! #endif + +! key_char = charcode; +! vimModifiers = EventModifiers2VimModifiers(modifiers); + +! /* Find the special key (eg., for cursor keys) */ +! if (actualSize <= sizeof(UniChar) && +! ((text[0] < 0x20) || (text[0] == 0x7f))) +! { +! for (i = 0; special_keys[i].key_sym != (KeySym)0; ++i) +! if (special_keys[i].key_sym == key_sym) +! { +! key_char = TO_SPECIAL(special_keys[i].vim_code0, +! special_keys[i].vim_code1); +! key_char = simplify_key(key_char, +! (int *)&vimModifiers); +! isSpecial = TRUE; +! break; +! } +! } + +! /* Intercept CMD-. and CTRL-c */ +! if (((modifiers & controlKey) && key_char == 'c') || +! ((modifiers & cmdKey) && key_char == '.')) +! got_int = TRUE; + +! if (!isSpecial) +! { +! /* remove SHIFT for keys that are already shifted, e.g., +! * '(' and '*' */ +! if (key_char < 0x100 && !isalpha(key_char) && isprint(key_char)) +! vimModifiers &= ~MOD_MASK_SHIFT; + +! /* remove CTRL from keys that already have it */ +! if (key_char < 0x20) +! vimModifiers &= ~MOD_MASK_CTRL; + +! /* don't process unicode characters here */ +! if (!IS_SPECIAL(key_char)) +! { +! /* Following code to simplify and consolidate vimModifiers +! * taken liberally from gui_w48.c */ +! key_char = simplify_key(key_char, (int *)&vimModifiers); + +! /* Interpret META, include SHIFT, etc. */ +! key_char = extract_modifiers(key_char, (int *)&vimModifiers); +! if (key_char == CSI) +! key_char = K_CSI; + +! if (IS_SPECIAL(key_char)) +! isSpecial = TRUE; +! } +! } + +! if (vimModifiers) +! { +! result[len++] = CSI; +! result[len++] = KS_MODIFIER; +! result[len++] = vimModifiers; +! } + +! if (isSpecial && IS_SPECIAL(key_char)) +! { +! result[len++] = CSI; +! result[len++] = K_SECOND(key_char); +! result[len++] = K_THIRD(key_char); +! } +! else +! { +! encLen = actualSize; +! to = mac_utf16_to_enc(text, actualSize, &encLen); +! if (to) +! { +! /* This is basically add_to_input_buf_csi() */ +! for (i = 0; i < encLen && len < (INLINE_KEY_BUFFER_SIZE-1); ++i) +! { +! result[len++] = to[i]; +! if (to[i] == CSI) +! { +! result[len++] = KS_EXTRA; +! result[len++] = (int)KE_CSI; +! } +! } +! vim_free(to); +! } +! } + +! add_to_input_buf(result, len); +! err = noErr; + +! done: +! vim_free(text); +! if (err == noErr) +! { +! /* Fake event to wake up WNE (required to get +! * key repeat working */ +! PostEvent(keyUp, 0); +! return noErr; + } + +! return eventNotHandledErr; + } + #else + void +*************** +*** 5748,5754 **** + /* TODO: Get the text selection from Vim */ + + /* Call to Handle Popup */ +! status = ContextualMenuSelect(CntxMenu, where, false, kCMHelpItemNoHelp, HelpName, NULL, &CntxType, &CntxMenuID, &CntxMenuItem); + + if (status == noErr) + { +--- 5727,5734 ---- + /* TODO: Get the text selection from Vim */ + + /* Call to Handle Popup */ +! status = ContextualMenuSelect(CntxMenu, where, false, kCMHelpItemNoHelp, +! HelpName, NULL, &CntxType, &CntxMenuID, &CntxMenuItem); + + if (status == noErr) + { +*************** +*** 5756,5762 **** + { + /* Handle the menu CntxMenuID, CntxMenuItem */ + /* The submenu can be handle directly by gui_mac_handle_menu */ +! /* But what about the current menu, is the menu changed by ContextualMenuSelect */ + gui_mac_handle_menu((CntxMenuID << 16) + CntxMenuItem); + } + else if (CntxMenuID == kCMShowHelpSelected) +--- 5736,5743 ---- + { + /* Handle the menu CntxMenuID, CntxMenuItem */ + /* The submenu can be handle directly by gui_mac_handle_menu */ +! /* But what about the current menu, is the menu changed by +! * ContextualMenuSelect */ + gui_mac_handle_menu((CntxMenuID << 16) + CntxMenuItem); + } + else if (CntxMenuID == kCMShowHelpSelected) +*** ../vim-7.0.137/src/version.c Tue Oct 17 11:50:45 2006 +--- src/version.c Tue Oct 17 12:51:21 2006 +*************** +*** 668,669 **** +--- 668,671 ---- + { /* Add new patch number below this line */ ++ /**/ ++ 138, + /**/ + +-- +hundred-and-one symptoms of being an internet addict: +52. You ask a plumber how much it would cost to replace the chair in front of + your computer with a toilet. + + /// Bram Moolenaar -- Bram@Moolenaar.net -- http://www.Moolenaar.net \\\ +/// sponsor Vim, vote for features -- http://www.Vim.org/sponsor/ \\\ +\\\ download, build and distribute -- http://www.A-A-P.org /// + \\\ help me help AIDS victims -- http://ICCF-Holland.org /// --- vim-7.0.orig/upstream/patches/7.0.057 +++ vim-7.0/upstream/patches/7.0.057 @@ -0,0 +1,74 @@ +To: vim-dev@vim.org +Subject: Patch 7.0.057 (extra) +Fcc: outbox +From: Bram Moolenaar +Mime-Version: 1.0 +Content-Type: text/plain; charset=ISO-8859-1 +Content-Transfer-Encoding: 8bit +------------ + +Patch 7.0.057 (extra, after 7.0.45) +Problem: Win32: Compilation problem with Borland C 5.5. +Solution: Include vim.h as before. (Mark S. Williams) +Files: src/if_ole.cpp + + +*** ../vim-7.0.056/src/if_ole.cpp Tue Aug 8 17:06:21 2006 +--- src/if_ole.cpp Sun Aug 13 12:57:24 2006 +*************** +*** 13,26 **** + * See os_mswin.c for the client side. + */ + + extern "C" { +! #include "vim.h" + } + + #include + #include + + extern "C" { + extern HWND s_hwnd; + extern HWND vim_parent_hwnd; + } +--- 13,35 ---- + * See os_mswin.c for the client side. + */ + ++ /* ++ * We have some trouble with order of includes here. For Borland it needs to ++ * be different from MSVC... ++ */ ++ #ifndef __BORLANDC__ + extern "C" { +! # include "vim.h" + } ++ #endif + + #include + #include + + extern "C" { ++ #ifdef __BORLANDC__ ++ # include "vim.h" ++ #endif + extern HWND s_hwnd; + extern HWND vim_parent_hwnd; + } +*** ../vim-7.0.056/src/version.c Wed Aug 16 17:06:22 2006 +--- src/version.c Wed Aug 16 17:35:57 2006 +*************** +*** 668,669 **** +--- 668,671 ---- + { /* Add new patch number below this line */ ++ /**/ ++ 57, + /**/ + +-- +Send $25.00 for handy leaflet on how to make money by selling leaflets + + /// Bram Moolenaar -- Bram@Moolenaar.net -- http://www.Moolenaar.net \\\ +/// sponsor Vim, vote for features -- http://www.Vim.org/sponsor/ \\\ +\\\ download, build and distribute -- http://www.A-A-P.org /// + \\\ help me help AIDS victims -- http://ICCF-Holland.org /// --- vim-7.0.orig/upstream/patches/7.0.051 +++ vim-7.0/upstream/patches/7.0.051 @@ -0,0 +1,227 @@ +To: vim-dev@vim.org +Subject: Patch 7.0.051 +Fcc: outbox +From: Bram Moolenaar +Mime-Version: 1.0 +Content-Type: text/plain; charset=ISO-8859-1 +Content-Transfer-Encoding: 8bit +------------ + +Patch 7.0.051 (after 7.0.44) +Problem: The Perl interface doesn't compile or doesn't work properly. +Solution: Remove the spaces before #ifdef and avoid an empty line above it. +Files: src/if_perl.xs + + +*** ../vim-7.0.050/src/if_perl.xs Tue Aug 8 16:47:38 2006 +--- src/if_perl.xs Fri Aug 11 22:51:01 2006 +*************** +*** 1068,1098 **** + line = SvPV(ST(i),PL_na); + if (lnum > 0 && lnum <= vimbuf->b_ml.ml_line_count && line != NULL) + { +! #ifdef FEAT_AUTOCMD + aco_save_T aco; + + /* set curwin/curbuf for "vimbuf" and save some things */ + aucmd_prepbuf(&aco, vimbuf); +! #else + buf_T *save_curbuf = curbuf; + + curbuf = vimbuf; + curwin->w_buffer = vimbuf; +! #endif + if (u_savesub(lnum) == OK) + { + ml_replace(lnum, (char_u *)line, TRUE); + changed_bytes(lnum, 0); + } +! +! #ifdef FEAT_AUTOCMD + /* restore curwin/curbuf and a few other things */ + aucmd_restbuf(&aco); + /* Careful: autocommands may have made "vimbuf" invalid! */ +! #else + curwin->w_buffer = save_curbuf; + curbuf = save_curbuf; +! #endif + } + } + } +--- 1068,1097 ---- + line = SvPV(ST(i),PL_na); + if (lnum > 0 && lnum <= vimbuf->b_ml.ml_line_count && line != NULL) + { +! #ifdef FEAT_AUTOCMD + aco_save_T aco; + + /* set curwin/curbuf for "vimbuf" and save some things */ + aucmd_prepbuf(&aco, vimbuf); +! #else + buf_T *save_curbuf = curbuf; + + curbuf = vimbuf; + curwin->w_buffer = vimbuf; +! #endif + if (u_savesub(lnum) == OK) + { + ml_replace(lnum, (char_u *)line, TRUE); + changed_bytes(lnum, 0); + } +! #ifdef FEAT_AUTOCMD + /* restore curwin/curbuf and a few other things */ + aucmd_restbuf(&aco); + /* Careful: autocommands may have made "vimbuf" invalid! */ +! #else + curwin->w_buffer = save_curbuf; + curbuf = save_curbuf; +! #endif + } + } + } +*************** +*** 1130,1144 **** + if (lnum > 0 && lnum <= vimbuf->b_ml.ml_line_count) + { + buf_T *save_curbuf = curbuf; +! #ifdef FEAT_AUTOCMD + aco_save_T aco; + + /* set curwin/curbuf for "vimbuf" and save some things */ + aucmd_prepbuf(&aco, vimbuf); +! #else + curbuf = vimbuf; + curwin->w_buffer = vimbuf; +! #endif + if (u_savedel(lnum, 1) == OK) + { + ml_delete(lnum, 0); +--- 1129,1143 ---- + if (lnum > 0 && lnum <= vimbuf->b_ml.ml_line_count) + { + buf_T *save_curbuf = curbuf; +! #ifdef FEAT_AUTOCMD + aco_save_T aco; + + /* set curwin/curbuf for "vimbuf" and save some things */ + aucmd_prepbuf(&aco, vimbuf); +! #else + curbuf = vimbuf; + curwin->w_buffer = vimbuf; +! #endif + if (u_savedel(lnum, 1) == OK) + { + ml_delete(lnum, 0); +*************** +*** 1146,1159 **** + if (save_curbuf == curbuf) + check_cursor(); + } +! #ifdef FEAT_AUTOCMD + /* restore curwin/curbuf and a few other things */ + aucmd_restbuf(&aco); + /* Careful: autocommands may have made "vimbuf" invalid! */ +! #else + curwin->w_buffer = save_curbuf; + curbuf = save_curbuf; +! #endif + update_curbuf(VALID); + } + } +--- 1145,1158 ---- + if (save_curbuf == curbuf) + check_cursor(); + } +! #ifdef FEAT_AUTOCMD + /* restore curwin/curbuf and a few other things */ + aucmd_restbuf(&aco); + /* Careful: autocommands may have made "vimbuf" invalid! */ +! #else + curwin->w_buffer = save_curbuf; + curbuf = save_curbuf; +! #endif + update_curbuf(VALID); + } + } +*************** +*** 1180,1210 **** + line = SvPV(ST(i),PL_na); + if (lnum >= 0 && lnum <= vimbuf->b_ml.ml_line_count && line != NULL) + { +! #ifdef FEAT_AUTOCMD + aco_save_T aco; + + /* set curwin/curbuf for "vimbuf" and save some things */ + aucmd_prepbuf(&aco, vimbuf); +! #else + buf_T *save_curbuf = curbuf; + + curbuf = vimbuf; + curwin->w_buffer = vimbuf; +! #endif + if (u_inssub(lnum + 1) == OK) + { + ml_append(lnum, (char_u *)line, (colnr_T)0, FALSE); + appended_lines_mark(lnum, 1L); + } +! +! #ifdef FEAT_AUTOCMD + /* restore curwin/curbuf and a few other things */ + aucmd_restbuf(&aco); + /* Careful: autocommands may have made "vimbuf" invalid! */ +! #else + curwin->w_buffer = save_curbuf; + curbuf = save_curbuf; +! #endif + update_curbuf(VALID); + } + } +--- 1179,1208 ---- + line = SvPV(ST(i),PL_na); + if (lnum >= 0 && lnum <= vimbuf->b_ml.ml_line_count && line != NULL) + { +! #ifdef FEAT_AUTOCMD + aco_save_T aco; + + /* set curwin/curbuf for "vimbuf" and save some things */ + aucmd_prepbuf(&aco, vimbuf); +! #else + buf_T *save_curbuf = curbuf; + + curbuf = vimbuf; + curwin->w_buffer = vimbuf; +! #endif + if (u_inssub(lnum + 1) == OK) + { + ml_append(lnum, (char_u *)line, (colnr_T)0, FALSE); + appended_lines_mark(lnum, 1L); + } +! #ifdef FEAT_AUTOCMD + /* restore curwin/curbuf and a few other things */ + aucmd_restbuf(&aco); + /* Careful: autocommands may have made "vimbuf" invalid! */ +! #else + curwin->w_buffer = save_curbuf; + curbuf = save_curbuf; +! #endif + update_curbuf(VALID); + } + } +*** ../vim-7.0.050/src/version.c Tue Aug 8 21:36:15 2006 +--- src/version.c Fri Aug 11 22:55:25 2006 +*************** +*** 668,669 **** +--- 668,671 ---- + { /* Add new patch number below this line */ ++ /**/ ++ 51, + /**/ + +-- +"A clear conscience is usually the sign of a bad memory." + -- Steven Wright + + /// Bram Moolenaar -- Bram@Moolenaar.net -- http://www.Moolenaar.net \\\ +/// sponsor Vim, vote for features -- http://www.Vim.org/sponsor/ \\\ +\\\ download, build and distribute -- http://www.A-A-P.org /// + \\\ help me help AIDS victims -- http://ICCF-Holland.org /// --- vim-7.0.orig/upstream/patches/7.0.059 +++ vim-7.0/upstream/patches/7.0.059 @@ -0,0 +1,55 @@ +To: vim-dev@vim.org +Subject: Patch 7.0.059 +Fcc: outbox +From: Bram Moolenaar +Mime-Version: 1.0 +Content-Type: text/plain; charset=ISO-8859-1 +Content-Transfer-Encoding: 8bit +------------ + +Patch 7.0.059 +Problem: The Perl interface doesn't compile with ActiveState Perl 5.8.8. +Solution: Remove the __attribute__() items. (Edward L. Fox) +Files: src/if_perl.xs + + +*** ../vim-7.0.058/src/if_perl.xs Fri Aug 11 22:56:44 2006 +--- src/if_perl.xs Wed Aug 16 14:45:15 2006 +*************** +*** 155,162 **** + static int (*perl_run)(PerlInterpreter*); + static int (*perl_parse)(PerlInterpreter*, XSINIT_t, int, char**, char**); + static void* (*Perl_get_context)(void); +! static void (*Perl_croak)(pTHX_ const char*, ...) __attribute__((noreturn)); +! static void (*Perl_croak_nocontext)(const char*, ...) __attribute__((noreturn)); + static I32 (*Perl_dowantarray)(pTHX); + static void (*Perl_free_tmps)(pTHX); + static HV* (*Perl_gv_stashpv)(pTHX_ const char*, I32); +--- 155,162 ---- + static int (*perl_run)(PerlInterpreter*); + static int (*perl_parse)(PerlInterpreter*, XSINIT_t, int, char**, char**); + static void* (*Perl_get_context)(void); +! static void (*Perl_croak)(pTHX_ const char*, ...); +! static void (*Perl_croak_nocontext)(const char*, ...); + static I32 (*Perl_dowantarray)(pTHX); + static void (*Perl_free_tmps)(pTHX); + static HV* (*Perl_gv_stashpv)(pTHX_ const char*, I32); +*** ../vim-7.0.058/src/version.c Wed Aug 16 18:05:36 2006 +--- src/version.c Wed Aug 16 18:18:35 2006 +*************** +*** 668,669 **** +--- 668,671 ---- + { /* Add new patch number below this line */ ++ /**/ ++ 59, + /**/ + +-- +hundred-and-one symptoms of being an internet addict: +163. You go outside for the fresh air (at -30 degrees) but open the + window first to hear new mail arrive. + + /// Bram Moolenaar -- Bram@Moolenaar.net -- http://www.Moolenaar.net \\\ +/// sponsor Vim, vote for features -- http://www.Vim.org/sponsor/ \\\ +\\\ download, build and distribute -- http://www.A-A-P.org /// + \\\ help me help AIDS victims -- http://ICCF-Holland.org /// --- vim-7.0.orig/upstream/patches/7.0.053 +++ vim-7.0/upstream/patches/7.0.053 @@ -0,0 +1,53 @@ +To: vim-dev@vim.org +Subject: Patch 7.0.053 +Fcc: outbox +From: Bram Moolenaar +Mime-Version: 1.0 +Content-Type: text/plain; charset=ISO-8859-1 +Content-Transfer-Encoding: 8bit +------------ + +Patch 7.0.053 +Problem: Shortening a directory name may fail when there are multi-byte + characters. +Solution: Copy the correct bytes. (Titov Anatoly) +Files: src/misc1.c + + +*** ../vim-7.0.052/src/misc1.c Sun Apr 30 20:49:14 2006 +--- src/misc1.c Tue Aug 8 11:23:45 2006 +*************** +*** 4492,4498 **** + int l = mb_ptr2len(s); + + while (--l > 0) +! *d++ = *s++; + } + # endif + } +--- 4492,4498 ---- + int l = mb_ptr2len(s); + + while (--l > 0) +! *d++ = *++s; + } + # endif + } +*** ../vim-7.0.052/src/version.c Tue Aug 15 21:42:18 2006 +--- src/version.c Tue Aug 15 22:23:44 2006 +*************** +*** 668,669 **** +--- 668,671 ---- + { /* Add new patch number below this line */ ++ /**/ ++ 53, + /**/ + +-- +hundred-and-one symptoms of being an internet addict: +150. You find yourself counting emoticons to get to sleep. + + /// Bram Moolenaar -- Bram@Moolenaar.net -- http://www.Moolenaar.net \\\ +/// sponsor Vim, vote for features -- http://www.Vim.org/sponsor/ \\\ +\\\ download, build and distribute -- http://www.A-A-P.org /// + \\\ help me help AIDS victims -- http://ICCF-Holland.org /// --- vim-7.0.orig/upstream/patches/7.0.040 +++ vim-7.0/upstream/patches/7.0.040 @@ -0,0 +1,60 @@ +To: vim-dev@vim.org +Subject: Patch 7.0.040 +Fcc: outbox +From: Bram Moolenaar +Mime-Version: 1.0 +Content-Type: text/plain; charset=ISO-8859-1 +Content-Transfer-Encoding: 8bit +------------ + +Patch 7.0.040 +Problem: When 'cmdheight' is larger than 1 using inputlist() or selecting + a spell suggestion with the mouse gets the wrong entry. +Solution: Start listing the first alternative on the last line of the screen. +Files: src/eval.c, src/spell.c + + +*** ../vim-7.0.039/src/eval.c Thu Jul 13 08:30:50 2006 +--- src/eval.c Mon Jul 10 23:03:13 2006 +*************** +*** 11497,11502 **** +--- 11497,11503 ---- + } + + msg_start(); ++ msg_row = Rows - 1; /* for when 'cmdheight' > 1 */ + lines_left = Rows; /* avoid more prompt */ + msg_scroll = TRUE; + msg_clr_eos(); +*** ../vim-7.0.039/src/spell.c Sat May 13 14:12:51 2006 +--- src/spell.c Mon Jul 10 23:03:04 2006 +*************** +*** 10071,10076 **** +--- 10071,10077 ---- + + /* List the suggestions. */ + msg_start(); ++ msg_row = Rows - 1; /* for when 'cmdheight' > 1 */ + lines_left = Rows; /* avoid more prompt */ + vim_snprintf((char *)IObuff, IOSIZE, _("Change \"%.*s\" to:"), + sug.su_badlen, sug.su_badptr); +*** ../vim-7.0.039/src/version.c Thu Jul 13 08:30:50 2006 +--- src/version.c Sun Jul 23 21:51:04 2006 +*************** +*** 668,669 **** +--- 668,671 ---- + { /* Add new patch number below this line */ ++ /**/ ++ 40, + /**/ + +-- +hundred-and-one symptoms of being an internet addict: +40. You tell the cab driver you live at + http://123.elm.street/house/bluetrim.html +41. You actually try that 123.elm.street address. + + /// Bram Moolenaar -- Bram@Moolenaar.net -- http://www.Moolenaar.net \\\ +/// sponsor Vim, vote for features -- http://www.Vim.org/sponsor/ \\\ +\\\ download, build and distribute -- http://www.A-A-P.org /// + \\\ help me help AIDS victims -- http://ICCF-Holland.org /// --- vim-7.0.orig/upstream/patches/7.0.139 +++ vim-7.0/upstream/patches/7.0.139 @@ -0,0 +1,79 @@ +To: vim-dev@vim.org +Subject: Patch 7.0.139 +Fcc: outbox +From: Bram Moolenaar +Mime-Version: 1.0 +Content-Type: text/plain; charset=ISO-8859-1 +Content-Transfer-Encoding: 8bit +------------ + +Patch 7.0.139 +Problem: Using CTRL-PageUp or CTRL-PageDown in Insert mode to go to another + tab page does not prepare for undo properly. (Stefano Zacchiroli) +Solution: Call start_arrow() before switching tab page. +Files: src/edit.c + + +*** ../vim-7.0.138/src/edit.c Sat Oct 14 14:33:21 2006 +--- src/edit.c Mon Oct 16 21:28:05 2006 +*************** +*** 8822,8828 **** + if (mod_mask & MOD_MASK_CTRL) + { + /* : tab page back */ +! goto_tabpage(-1); + return; + } + #endif +--- 8822,8832 ---- + if (mod_mask & MOD_MASK_CTRL) + { + /* : tab page back */ +! if (first_tabpage->tp_next != NULL) +! { +! start_arrow(&curwin->w_cursor); +! goto_tabpage(-1); +! } + return; + } + #endif +*************** +*** 8881,8887 **** + if (mod_mask & MOD_MASK_CTRL) + { + /* : tab page forward */ +! goto_tabpage(0); + return; + } + #endif +--- 8885,8895 ---- + if (mod_mask & MOD_MASK_CTRL) + { + /* : tab page forward */ +! if (first_tabpage->tp_next != NULL) +! { +! start_arrow(&curwin->w_cursor); +! goto_tabpage(0); +! } + return; + } + #endif +*** ../vim-7.0.138/src/version.c Tue Oct 17 12:53:31 2006 +--- src/version.c Tue Oct 17 13:38:27 2006 +*************** +*** 668,669 **** +--- 668,671 ---- + { /* Add new patch number below this line */ ++ /**/ ++ 139, + /**/ + +-- +hundred-and-one symptoms of being an internet addict: +53. To find out what time it is, you send yourself an e-mail and check the + "Date:" field. + + /// Bram Moolenaar -- Bram@Moolenaar.net -- http://www.Moolenaar.net \\\ +/// sponsor Vim, vote for features -- http://www.Vim.org/sponsor/ \\\ +\\\ download, build and distribute -- http://www.A-A-P.org /// + \\\ help me help AIDS victims -- http://ICCF-Holland.org /// --- vim-7.0.orig/upstream/patches/7.0.019 +++ vim-7.0/upstream/patches/7.0.019 @@ -0,0 +1,46 @@ +To: vim-dev@vim.org +Subject: Patch 7.0.019 +Fcc: outbox +From: Bram Moolenaar +Mime-Version: 1.0 +Content-Type: text/plain; charset=ISO-8859-1 +Content-Transfer-Encoding: 8bit +------------ + +Patch 7.0.019 +Problem: Repeating "VjA789" may cause a crash. (James Vega) +Solution: Check the cursor column after moving it to another line. +Files: src/ops.c + + +*** ../vim-7.0.018/src/ops.c Sun Apr 30 20:45:12 2006 +--- src/ops.c Tue Jun 20 12:49:46 2006 +*************** +*** 2413,2418 **** +--- 2413,2419 ---- + else + { + curwin->w_cursor = oap->end; ++ check_cursor_col(); + + /* Works just like an 'i'nsert on the next character. */ + if (!lineempty(curwin->w_cursor.lnum) +*** ../vim-7.0.018/src/version.c Mon Jun 19 10:56:20 2006 +--- src/version.c Tue Jun 20 12:55:10 2006 +*************** +*** 668,669 **** +--- 668,671 ---- + { /* Add new patch number below this line */ ++ /**/ ++ 19, + /**/ + +-- +Two cows are standing together in a field. One asks the other: +"So what do you think about this Mad Cow Disease?" +The other replies: "That doesn't concern me. I'm a helicopter." + + /// Bram Moolenaar -- Bram@Moolenaar.net -- http://www.Moolenaar.net \\\ +/// sponsor Vim, vote for features -- http://www.Vim.org/sponsor/ \\\ +\\\ download, build and distribute -- http://www.A-A-P.org /// + \\\ help me help AIDS victims -- http://ICCF-Holland.org /// --- vim-7.0.orig/upstream/patches/7.0.150 +++ vim-7.0/upstream/patches/7.0.150 @@ -0,0 +1,97 @@ +To: vim-dev@vim.org +Subject: Patch 7.0.150 +Fcc: outbox +From: Bram Moolenaar +Mime-Version: 1.0 +Content-Type: text/plain; charset=ISO-8859-1 +Content-Transfer-Encoding: 8bit +------------ + +Patch 7.0.150 +Problem: When resizing the Vim window scrollbinding doesn't work. (Yakov + Lerner) +Solution: Do scrollbinding in set_shellsize(). +Files: src/term.c + + +*** ../vim-7.0.149/src/term.c Wed Aug 16 21:42:34 2006 +--- src/term.c Tue Oct 24 11:26:33 2006 +*************** +*** 3137,3161 **** + screenalloc(FALSE); + repeat_message(); + } +- else if (State & CMDLINE) +- { +- update_screen(NOT_VALID); +- redrawcmdline(); +- } + else + { +! update_topline(); +! #if defined(FEAT_INS_EXPAND) +! if (pum_visible()) + { +! redraw_later(NOT_VALID); +! ins_compl_show_pum(); /* This includes the redraw. */ + } + else + #endif +! update_screen(NOT_VALID); +! if (redrawing()) +! setcursor(); + } + cursor_on(); /* redrawing may have switched it off */ + } +--- 3138,3169 ---- + screenalloc(FALSE); + repeat_message(); + } + else + { +! #ifdef FEAT_SCROLLBIND +! if (curwin->w_p_scb) +! do_check_scrollbind(TRUE); +! #endif +! if (State & CMDLINE) + { +! update_screen(NOT_VALID); +! redrawcmdline(); + } + else ++ { ++ update_topline(); ++ #if defined(FEAT_INS_EXPAND) ++ if (pum_visible()) ++ { ++ redraw_later(NOT_VALID); ++ ins_compl_show_pum(); /* This includes the redraw. */ ++ } ++ else + #endif +! update_screen(NOT_VALID); +! if (redrawing()) +! setcursor(); +! } + } + cursor_on(); /* redrawing may have switched it off */ + } +*** ../vim-7.0.149/src/version.c Tue Oct 24 21:15:09 2006 +--- src/version.c Tue Oct 24 21:33:39 2006 +*************** +*** 668,669 **** +--- 668,671 ---- + { /* Add new patch number below this line */ ++ /**/ ++ 150, + /**/ + +-- +hundred-and-one symptoms of being an internet addict: +106. When told to "go to your room" you inform your parents that you + can't...because you were kicked out and banned. + + /// Bram Moolenaar -- Bram@Moolenaar.net -- http://www.Moolenaar.net \\\ +/// sponsor Vim, vote for features -- http://www.Vim.org/sponsor/ \\\ +\\\ download, build and distribute -- http://www.A-A-P.org /// + \\\ help me help AIDS victims -- http://ICCF-Holland.org /// --- vim-7.0.orig/upstream/patches/7.0.134 +++ vim-7.0/upstream/patches/7.0.134 @@ -0,0 +1,83 @@ +To: vim-dev@vim.org +Subject: Patch 7.0.134 +Fcc: outbox +From: Bram Moolenaar +Mime-Version: 1.0 +Content-Type: text/plain; charset=ISO-8859-1 +Content-Transfer-Encoding: 8bit +------------ + +Patch 7.0.134 +Problem: Crash when comparing a recursively looped List or Dictionary. +Solution: Limit recursiveness for comparing to 1000. +Files: src/eval.c + + +*** ../vim-7.0.133/src/eval.c Tue Oct 10 12:56:09 2006 +--- src/eval.c Sun Oct 15 15:08:13 2006 +*************** +*** 5520,5538 **** + { + char_u buf1[NUMBUFLEN], buf2[NUMBUFLEN]; + char_u *s1, *s2; + +! if (tv1->v_type != tv2->v_type) + return FALSE; + + switch (tv1->v_type) + { + case VAR_LIST: +! /* recursive! */ +! return list_equal(tv1->vval.v_list, tv2->vval.v_list, ic); + + case VAR_DICT: +! /* recursive! */ +! return dict_equal(tv1->vval.v_dict, tv2->vval.v_dict, ic); + + case VAR_FUNC: + return (tv1->vval.v_string != NULL +--- 5520,5546 ---- + { + char_u buf1[NUMBUFLEN], buf2[NUMBUFLEN]; + char_u *s1, *s2; ++ static int recursive = 0; /* cach recursive loops */ ++ int r; + +! /* Catch lists and dicts that have an endless loop by limiting +! * recursiveness to 1000. */ +! if (tv1->v_type != tv2->v_type || recursive >= 1000) + return FALSE; + + switch (tv1->v_type) + { + case VAR_LIST: +! ++recursive; +! r = list_equal(tv1->vval.v_list, tv2->vval.v_list, ic); +! --recursive; +! return r; + + case VAR_DICT: +! ++recursive; +! r = dict_equal(tv1->vval.v_dict, tv2->vval.v_dict, ic); +! --recursive; +! return r; + + case VAR_FUNC: + return (tv1->vval.v_string != NULL +*** ../vim-7.0.133/src/version.c Sat Oct 14 14:33:21 2006 +--- src/version.c Sun Oct 15 15:03:30 2006 +*************** +*** 668,669 **** +--- 668,671 ---- + { /* Add new patch number below this line */ ++ /**/ ++ 134, + /**/ + +-- +It was recently discovered that research causes cancer in rats. + + /// Bram Moolenaar -- Bram@Moolenaar.net -- http://www.Moolenaar.net \\\ +/// sponsor Vim, vote for features -- http://www.Vim.org/sponsor/ \\\ +\\\ download, build and distribute -- http://www.A-A-P.org /// + \\\ help me help AIDS victims -- http://ICCF-Holland.org /// --- vim-7.0.orig/upstream/patches/7.0.046 +++ vim-7.0/upstream/patches/7.0.046 @@ -0,0 +1,68 @@ +To: vim-dev@vim.org +Subject: Patch 7.0.046 +Fcc: outbox +From: Bram Moolenaar +Mime-Version: 1.0 +Content-Type: text/plain; charset=ISO-8859-1 +Content-Transfer-Encoding: 8bit +------------ + +Patch 7.0.046 +Problem: The matchparen plugin ignores parens in strings, but not in single + quotes, often marked with "character". +Solution: Also ignore parens in syntax items matching "character". +Files: runtime/plugin/matchparen.vim + + +*** ../vim-7.0.045/runtime/plugin/matchparen.vim Sat May 13 14:52:02 2006 +--- runtime/plugin/matchparen.vim Mon Jun 26 10:53:35 2006 +*************** +*** 1,6 **** + " Vim plugin for showing matching parens + " Maintainer: Bram Moolenaar +! " Last Change: 2006 May 11 + + " Exit quickly when: + " - this plugin was already loaded (or disabled) +--- 1,6 ---- + " Vim plugin for showing matching parens + " Maintainer: Bram Moolenaar +! " Last Change: 2006 Jun 26 + + " Exit quickly when: + " - this plugin was already loaded (or disabled) +*************** +*** 96,102 **** + + " When not in a string or comment ignore matches inside them. + let s_skip ='synIDattr(synID(line("."), col("."), 0), "name") ' . +! \ '=~? "string\\|comment"' + execute 'if' s_skip '| let s_skip = 0 | endif' + + let [m_lnum, m_col] = searchpairpos(c, '', c2, s_flags, s_skip, stopline) +--- 96,102 ---- + + " When not in a string or comment ignore matches inside them. + let s_skip ='synIDattr(synID(line("."), col("."), 0), "name") ' . +! \ '=~? "string\\|character\\|singlequote\\|comment"' + execute 'if' s_skip '| let s_skip = 0 | endif' + + let [m_lnum, m_col] = searchpairpos(c, '', c2, s_flags, s_skip, stopline) +*** ../vim-7.0.045/src/version.c Tue Aug 8 17:06:21 2006 +--- src/version.c Tue Aug 8 18:07:37 2006 +*************** +*** 668,669 **** +--- 668,671 ---- + { /* Add new patch number below this line */ ++ /**/ ++ 46, + /**/ + +-- +I AM THANKFUL... +...for the taxes that I pay because it means that I am employed. + + /// Bram Moolenaar -- Bram@Moolenaar.net -- http://www.Moolenaar.net \\\ +/// sponsor Vim, vote for features -- http://www.Vim.org/sponsor/ \\\ +\\\ download, build and distribute -- http://www.A-A-P.org /// + \\\ help me help AIDS victims -- http://ICCF-Holland.org /// --- vim-7.0.orig/upstream/patches/7.0.082 +++ vim-7.0/upstream/patches/7.0.082 @@ -0,0 +1,103 @@ +To: vim-dev@vim.org +Subject: Patch 7.0.082 +Fcc: outbox +From: Bram Moolenaar +Mime-Version: 1.0 +Content-Type: text/plain; charset=ISO-8859-1 +Content-Transfer-Encoding: 8bit +------------ + +Patch 7.0.082 +Problem: Calling a function that waits for input may cause List and + Dictionary arguments to be freed by the garbage collector. +Solution: Keep a list of all arguments to internal functions. +Files: src/eval.c + + +*** ../vim-7.0.081/src/eval.c Sat Sep 2 13:45:01 2006 +--- src/eval.c Sun Sep 3 15:36:10 2006 +*************** +*** 248,253 **** +--- 248,264 ---- + }; + + /* ++ * Struct used to make a list of all arguments used in internal functions. ++ */ ++ typedef struct av_list_item_S av_list_item_T; ++ struct av_list_item_S { ++ av_list_item_T *avl_next; ++ typval_T *avl_argvars; ++ }; ++ ++ av_list_item_T *argvars_list = NULL; ++ ++ /* + * Info used by a ":for" loop. + */ + typedef struct +*************** +*** 6058,6063 **** +--- 6069,6075 ---- + int i; + funccall_T *fc; + int did_free = FALSE; ++ av_list_item_T *av; + #ifdef FEAT_WINDOWS + tabpage_T *tp; + #endif +*************** +*** 6094,6099 **** +--- 6106,6116 ---- + set_ref_in_ht(&fc->l_avars.dv_hashtab, copyID); + } + ++ /* arguments for internal functions */ ++ for (av = argvars_list; av != NULL; av = av->avl_next) ++ for (i = 0; av->avl_argvars[i].v_type != VAR_UNKNOWN; ++i) ++ set_ref_in_item(&av->avl_argvars[i], copyID); ++ + /* + * 2. Go through the list of dicts and free items without the copyID. + */ +*************** +*** 7537,7545 **** +--- 7554,7574 ---- + error = ERROR_TOOMANY; + else + { ++ av_list_item_T av_list_item; ++ ++ /* Add the arguments to the "argvars_list" to avoid the ++ * garbage collector not seeing them. This isn't needed ++ * for user functions, because the arguments are available ++ * in the a: hashtab. */ ++ av_list_item.avl_argvars = argvars; ++ av_list_item.avl_next = argvars_list; ++ argvars_list = &av_list_item; ++ + argvars[argcount].v_type = VAR_UNKNOWN; + functions[i].f_func(argvars, rettv); + error = ERROR_NONE; ++ ++ argvars_list = av_list_item.avl_next; + } + } + } +*** ../vim-7.0.081/src/version.c Sat Sep 2 17:58:36 2006 +--- src/version.c Sun Sep 3 15:35:16 2006 +*************** +*** 668,669 **** +--- 668,671 ---- + { /* Add new patch number below this line */ ++ /**/ ++ 82, + /**/ + +-- +Just think of all the things we haven't thought of yet. + + /// Bram Moolenaar -- Bram@Moolenaar.net -- http://www.Moolenaar.net \\\ +/// sponsor Vim, vote for features -- http://www.Vim.org/sponsor/ \\\ +\\\ download, build and distribute -- http://www.A-A-P.org /// + \\\ help me help AIDS victims -- http://ICCF-Holland.org /// --- vim-7.0.orig/upstream/patches/7.0.050 +++ vim-7.0/upstream/patches/7.0.050 @@ -0,0 +1,47 @@ +To: vim-dev@vim.org +Subject: Patch 7.0.050 +Fcc: outbox +From: Bram Moolenaar +Mime-Version: 1.0 +Content-Type: text/plain; charset=ISO-8859-1 +Content-Transfer-Encoding: 8bit +------------ + +Patch 7.0.050 +Problem: After using the netbeans interface close command a stale pointer + may be used. +Solution: Clear the pointer to the closed buffer. (Xaview de Gaye) +Files: src/netbeans.c + + +*** ../vim-7.0.049/src/netbeans.c Sun Apr 23 00:21:07 2006 +--- src/netbeans.c Fri Aug 4 23:02:54 2006 +*************** +*** 1986,1991 **** +--- 1986,1993 ---- + if (buf->bufp != NULL) + do_buffer(DOBUF_WIPE, DOBUF_FIRST, FORWARD, + buf->bufp->b_fnum, TRUE); ++ buf->bufp = NULL; ++ buf->initDone = FALSE; + doupdate = 1; + /* =====================================================================*/ + } +*** ../vim-7.0.049/src/version.c Tue Aug 8 20:56:11 2006 +--- src/version.c Tue Aug 8 21:35:25 2006 +*************** +*** 668,669 **** +--- 668,671 ---- + { /* Add new patch number below this line */ ++ /**/ ++ 50, + /**/ + +-- +From "know your smileys": + :-E Has major dental problems + + /// Bram Moolenaar -- Bram@Moolenaar.net -- http://www.Moolenaar.net \\\ +/// sponsor Vim, vote for features -- http://www.Vim.org/sponsor/ \\\ +\\\ download, build and distribute -- http://www.A-A-P.org /// + \\\ help me help AIDS victims -- http://ICCF-Holland.org /// --- vim-7.0.orig/upstream/patches/7.0.095 +++ vim-7.0/upstream/patches/7.0.095 @@ -0,0 +1,935 @@ +To: vim-dev@vim.org +Subject: Patch 7.0.095 +Fcc: outbox +From: Bram Moolenaar +Mime-Version: 1.0 +Content-Type: text/plain; charset=ISO-8859-1 +Content-Transfer-Encoding: 8bit +------------ + +Patch 7.0.095 +Problem: The Greek tutor is not available in utf-8. "el" is used for the + language, only "gr" for the country is recognized. +Solution: Add the utf-8 Greek tutor. Use it for conversion to iso-8859-7 + and cp737. (Lefteris Dimitroulakis) +Files: runtime/tutor/Makefile, runtime/tutor/tutor.gr.utf-8, + runtime/tutor/tutor.vim + + +*** ../vim-7.0.094/runtime/tutor/Makefile Sat Sep 2 14:54:17 2006 +--- runtime/tutor/Makefile Sun Sep 10 11:56:54 2006 +*************** +*** 7,13 **** + + all: tutor.ja.sjis tutor.ja.euc \ + tutor.ko.euc \ +! tutor.ru tutor.ru.cp1251 + + tutor.ja.sjis: tutor.ja.utf-8 + nkf -WXs tutor.ja.utf-8 > tutor.ja.sjis +--- 7,14 ---- + + all: tutor.ja.sjis tutor.ja.euc \ + tutor.ko.euc \ +! tutor.ru tutor.ru.cp1251 \ +! tutor.gr tutor.gr.cp737 + + tutor.ja.sjis: tutor.ja.utf-8 + nkf -WXs tutor.ja.utf-8 > tutor.ja.sjis +*************** +*** 23,25 **** +--- 24,32 ---- + + tutor.ru.cp1251: tutor.ru.utf-8 + iconv -f UTF-8 -t cp1251 tutor.ru.utf-8 > tutor.ru.cp1251 ++ ++ tutor.gr: tutor.gr.utf-8 ++ iconv -f UTF-8 -t ISO-8859-7 tutor.gr.utf-8 > tutor.gr ++ ++ tutor.gr.cp737: tutor.gr.utf-8 ++ iconv -f UTF-8 -t cp737 tutor.gr.utf-8 > tutor.gr.cp737 +*** ../vim-7.0.094/runtime/tutor/tutor.gr.utf-8 Sun Sep 10 13:20:58 2006 +--- runtime/tutor/tutor.gr.utf-8 Sun Sep 10 11:54:10 2006 +*************** +*** 0 **** +--- 1,815 ---- ++ =============================================================================== ++ = Κ αλ ω σ ή ρ θ α τ ε σ τ ο V I M T u t o r - Έκδοση 1.5 = ++ =============================================================================== ++ ++ Ο Vim είναι ένας πανίσχυρος συντάκτης που έχει πολλές εντολές, πάρα ++ πολλές για να εξηγήσουμε σε μία περιήγηση όπως αυτή. Αυτή η περιήγηση ++ σχεδιάστηκε για να περιγράψει ικανοποιητικά τις εντολές που θα σας ++ κάνουν να χρησιμοποιείτε εύκολα τον Vim σαν έναν γενικής χρήσης συντάκτη. ++ ++ Ο κατά προσέγγιση χρόνος που απαιτείται για να ολοκληρώσετε την περιήγηση ++ είναι 25-30 λεπτά, εξαρτώντας από το πόσο χρόνο θα ξοδέψετε για ++ πειραματισμούς. ++ ++ Οι εντολές στα μαθήματα θα τροποποιήσουν το κείμενο. Δημιουργήστε ένα ++ αντίγραφο αυτού του αρχείου για να εξασκηθείτε (αν ξεκινήσατε το ++ "Vimtutor" αυτό είναι ήδη ένα αντίγραφο). ++ ++ Είναι σημαντικό να θυμάστε ότι αυτή η περιήγηση είναι οργανωμένη έτσι ++ ώστε να διδάσκει μέσω της χρήσης. Αυτό σημαίνει ότι χρειάζεται να ++ εκτελείτε τις εντολές για να τις μάθετε σωστά. Αν διαβάζετε μόνο το ++ κείμενο, θα τις ξεχάσετε! ++ ++ Τώρα, βεβαιωθείτε ότι το πλήκτρο Shift-Lock ΔΕΝ είναι πατημένο και ++ πατήστε το πλήκτρο j αρκετές φορές για να μετακινήσετε τον δρομέα έτσι ++ ώστε το Μάθημα 1.1 να γεμίσει πλήρως την οθόνη. ++ ++ ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ ++ Μάθημα 1.1: ΜΕΤΑΚΙΝΟΝΤΑΣ ΤΟΝ ΔΡΟΜΕΑ ++ ++ ** Για να κινήσετε τον δρομέα, πατήστε τα πλήκτρα h,j,k,l όπως δείχνεται. ** ++ ^ ++ k Hint: Το πλήκτρο h είναι αριστερά και κινεί στ' αριστερά. ++ < h l > Το πλήκτρο l είναι δεξιά και κινεί στα δεξιά. ++ j Το πλήκτρο j μοιάζει με βελάκι προς τα κάτω. ++ v ++ ++ 1. Μετακινείστε τον δρομέα τριγύρω στην οθόνη μέχρι να νοιώθετε άνετα. ++ ++ 2. Κρατήστε πατημένο το κάτω πλήκτρο (j) μέχρι να επαναληφθεί. ++ ---> Τώρα ξέρετε πώς να μετακινηθείτε στο επόμενο μάθημα. ++ ++ 3. Χρησιμοποιώντας το κάτω πλήκτρο, μετακινηθείτε στο Μάθημα 1.2. ++ ++ Σημείωση: Αν αμφιβάλλετε για κάτι που πατήσατε, πατήστε για να βρεθείτε ++ στην Κανονική Κατάσταση. Μετά πατήστε ξανά την εντολή που θέλατε. ++ ++ Σημείωση: Τα πλήκτρα του δρομέα θα πρέπει επίσης να δουλεύουν. Αλλά με τα hjkl ++ θα μπορείτε να κινηθείτε πολύ γρηγορότερα, μόλις τα συνηθίσετε. ++ ++ ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ ++ Μάθημα 1.2: ΜΠΑΙΝΟΝΤΑΣ ΚΑΙ ΒΓΑΙΝΟΝΤΑΣ ΣΤΟΝ VIM ++ ++ !! ΣΗΜΕΙΩΣΗ: Πριν εκτελέσετε κάποιο από τα βήματα, διαβάστε όλο το μάθημα!! ++ ++ 1. Πατήστε το πλήκτρο (για να είστε σίγουρα στην Κανονική Κατάσταση). ++ ++ 2. Πληκτρολογήστε: :q! . ++ ++ ---> Αυτό εξέρχεται από τον συντάκτη ΧΩΡΙΣ να σώσει όποιες αλλαγές έχετε κάνει. ++ Αν θέλετε να σώσετε τις αλλαγές και να εξέρθετε πληκτρολογήστε: ++ :wq ++ ++ 3. Όταν δείτε την προτροπή του φλοιού, πληκτρολογήστε την εντολή με την οποία ++ μπήκατε σε αυτήν την περιήγηση. Μπορεί να είναι: vimtutor ++ Κανονικά θα χρησιμοποιούσατε: vim tutor ++ ++ ---> 'vim' σημαίνει εισαγωγή στον συντάκτη vim, 'tutor' είναι το αρχείο που ++ θέλουμε να διορθώσουμε. ++ ++ 4. Αν έχετε απομνημονεύσει αυτά τα βήματα και έχετε αυτοπεποίθηση, εκτελέστε ++ τα βήματα 1 έως 3 για να βγείτε και να μπείτε ξανά στον συντάκτη. Μετά ++ μετακινήστε τον δρομέα κάτω στο Μάθημα 1.3. ++ ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ ++ Μάθημα 1.3: ΔΙΟΡΘΩΣΗ ΚΕΙΜΕΝΟΥ - ΔΙΑΓΡΑΦΗ ++ ++ ** Όσο είστε στην Κανονική Κατάσταση πατήστε x για να διαγράψετε τον ++ χαρακτήρα κάτω από τον δρομέα. ** ++ ++ 1. Μετακινείστε τον δρομέα στην παρακάτω γραμμή σημειωμένη με --->. ++ ++ 2. Για να διορθώσετε τα λάθη, κινείστε τον δρομέα μέχρι να είναι πάνω από ++ τον χαρακτήρα που θα διαγραφεί. ++ ++ 3. Πατήστε το πλήκτρο x για να διαγράψετε τον ανεπιθύμητο χαρακτήρα. ++ ++ 4. Επαναλάβετε τα βήματα 2 μέχρι 4 μέχρι η πρόταση να είναι σωστή. ++ ++ ---> The ccow jumpedd ovverr thhe mooon. ++ ++ 5. Τώρα που η γραμμή είναι σωστή, πηγαίντε στο Μάθημα 1.4. ++ ++ ΣΗΜΕΙΩΣΗ: Καθώς διατρέχετε αυτήν την περιήγηση, προσπαθήστε να μην ++ απομνημονεύετε, μαθαίνετε με τη χρήση. ++ ++ ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ ++ Μάθημα 1.4: ΔΙΟΡΘΩΣΗ ΚΕΙΜΕΝΟΥ - ΠΑΡΕΜΒΟΛΗ ++ ++ ** Όσο είστε σε Κανονική Κατάσταση πατήστε i για να παρεμβάλλετε κείμενο. ** ++ ++ 1. Μετακινείστε τον δρομέα μέχρι την πρώτη γραμμή παρακάτω σημειωμένη με --->. ++ ++ 2. Για να κάνετε την πρώτη γραμμή ίδια με την δεύτερη, μετακινείστε τον ++ δρομέα πάνω στον πρώτο χαρακτήρα ΜΕΤΑ από όπου θα παρεμβληθεί το κείμενο. ++ ++ 3. Πατήστε το i και πληκτρολογήστε τις απαραίτητες προσθήκες. ++ ++ 4. Καθώς διορθώνετε κάθε λάθος πατήστε για να επιστρέψετε στην ++ Κανονική Κατάσταση. Επαναλάβετε τα βήματα 2 μέχρι 4 για να διορθώσετε ++ την πρόταση. ++ ++ ---> There is text misng this . ++ ---> There is some text missing from this line. ++ ++ 5. Όταν είστε άνετοι με την παρεμβολή κειμένου μετακινηθείτε στην ++ παρακάτω περίληψη. ++ ++ ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ ++ ΜΑΘΗΜΑ 1 ΠΕΡΙΛΗΨΗ ++ ++ ++ 1. Ο δρομέας κινείται χρησιμοποιώντας είτε τα πλήκτρα δρομέα ή τα hjkl. ++ h (αριστέρα) j (κάτω) k (πάνω) l (δεξιά) ++ ++ 2. Για να μπείτε στον Vim (από την προτροπή %) γράψτε: vim ΑΡΧΕΙΟ ++ ++ 3. Για να βγείτε γράψτε: :q! για απόρριψη των αλλαγών. ++ Ή γράψτε: :wq για αποθήκευση των αλλαγών. ++ ++ 4. Για να διαγράψετε έναν χαρακτήρα κάτω από τον δρομέα σε ++ Κανονική Κατάσταση πατήστε: x ++ ++ 5. Για να εισάγετε κείμενο στον δρομέα όσο είστε σε Κανονική Κατάσταση γράψτε: ++ i πληκτρολογήστε το κείμενο ++ ++ ΣΗΜΕΙΩΣΗ: Πατώντας θα τοποθετηθείτε στην Κανονική Κατάσταση ή θα ++ ακυρώσετε μία ανεπιθύμητη και μερικώς ολοκληρωμένη εντολή. ++ ++ Τώρα συνεχίστε με το Μάθημα 2. ++ ++ ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ ++ Μάθημα 2.1: ΕΝΤΟΛΕΣ ΔΙΑΓΡΑΦΗΣ ++ ++ ** Γράψτε dw για να διαγράψετε μέχρι το τέλος μίας λέξης. ** ++ ++ 1. Πατήστε για να βεβαιωθείτε ότι είστε στην Κανονική Κατάσταση. ++ ++ 2. Μετακινείστε τον δρομέα στην παρακάτω γραμμή σημειωμένη με --->. ++ ++ 3. Πηγαίνετε τον δρομέα στην αρχή της λέξης που πρέπει να διαγραφεί. ++ ++ 4. Γράψτε dw για να κάνετε την λέξη να εξαφανιστεί. ++ ++ ΣΗΜΕΙΩΣΗ: Τα γράμματα dw θα εμφανιστούν στην τελευταία γραμμή της οθόνης όσο ++ τα πληκτρολογείτε. Αν γράψατε κάτι λάθος, πατήστε και ++ ξεκινήστε από την αρχή. ++ ++ ---> There are a some words fun that don't belong paper in this sentence. ++ ++ 5. Επαναλάβετε τα βήματα 3 και 4 μέχρι η πρόταση να είναι σωστή και ++ πηγαίνετε στο Μάθημα 2.2. ++ ++ ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ ++ Μάθημα 2.2: ΠΕΡΙΣΣΟΤΕΡΕΣ ΕΝΤΟΛΕΣ ΔΙΑΓΡΑΦΗΣ ++ ++ ** Πληκτρολογήστε d$ για να διαγράψετε μέχρι το τέλος της γραμμής. ** ++ ++ 1. Πατήστε για να βεβαιωθείτε ότι είστε στην Κανονική Κατάσταση. ++ ++ 2. Μετακινείστε τον δρομέα στην παρακάτω γραμμή σημειωμένη με --->. ++ ++ 3. Μετακινείστε τον δρομέα στο τέλος της σωστής γραμμής (ΜΕΤΑ την πρώτη . ). ++ ++ 4. Πατήστε d$ για να διαγράψετε μέχρι το τέλος της γραμμής. ++ ++ ---> Somebody typed the end of this line twice. end of this line twice. ++ ++ 5. Πηγαίνετε στο Μάθημα 2.3 για να καταλάβετε τι συμβαίνει. ++ ++ ++ ++ ++ ++ ++ ++ ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ ++ Μάθημα 2.3: ΠΕΡΙ ΕΝΤΟΛΩΝ ΚΑΙ ΑΝΤΙΚΕΙΜΕΝΩΝ ++ ++ ++ Η μορφή της εντολής διαγραφής d είναι ως εξής: ++ ++ [αριθμός] d αντικείμενο Ή d [αριθμός] αντικείμενο ++ Όπου: ++ αριθμός - πόσες φορές θα εκτελεστεί η εντολή (προαιρετικό, εξ' ορισμού=1). ++ d - η εντολή της διαγραφής. ++ αντικείμενο - πάνω σε τι θα λειτουργήσει η εντολή (παρακάτω λίστα). ++ ++ Μία μικρή λίστα από αντικείμενα: ++ w - από τον δρομέα μέχρι το τέλος της λέξης, περιλαμβάνοντας το διάστημα. ++ e - από τον δρομέα μέχρι το τέλος της λέξης, ΧΩΡΙΣ το διάστημα. ++ $ - από τον δρομέα μέχρι το τέλος της γραμμής. ++ ++ ΣΗΜΕΙΩΣΗ: Για τους τύπους της περιπέτειας, πατώντας απλώς το αντικείμενο όσο ++ είστε στην Κανονική Κατάσταση χωρίς κάποια εντολή θα μετακινήσετε ++ τον δρομέα όπως καθορίζεται στην λίστα αντικειμένων. ++ ++ ++ ++ ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ ++ Μάθημα 2.4: ΜΙΑ ΕΞΑΙΡΕΣΗ ΣΤΗΝ 'ΕΝΤΟΛΗ-ΑΝΤΙΚΕΙΜΕΝΟ' ++ ++ ** Πληκτρολογήστε dd για να διαγράψετε όλη τη γραμμή. ** ++ ++ Εξαιτίας της συχνότητας της διαγραφής ολόκληρης γραμμής, οι σχεδιαστές ++ του Vim αποφάσισαν ότι θα ήταν ευκολότερο να γράφετε απλώς δύο d στη ++ σειρά για να διαγράψετε μία γραμμή. ++ ++ 1. Μετακινείστε τον δρομέα στη δεύτερη γραμμή της παρακάτω φράσης. ++ 2. Γράψτε dd για να διαγράψετε τη γραμμή. ++ 3. Τώρα μετακινηθείτε στην τέταρτη γραμμή. ++ 4. Γράψτε 2dd (θυμηθείτε αριθμός-εντολή-αντικείμενο) για να ++ διαγράψετε δύο γραμμές. ++ ++ 1) Roses are red, ++ 2) Mud is fun, ++ 3) Violets are blue, ++ 4) I have a car, ++ 5) Clocks tell time, ++ 6) Sugar is sweet ++ 7) And so are you. ++ ++ ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ ++ Μάθημα 2.5: Η ΕΝΤΟΛΗ ΑΝΑΙΡΕΣΗΣ ++ ++ ** Πατήστε u για να αναιρέσετε τις τελευταίες εντολές, ++ U για να διορθώσετε όλη τη γραμμή. ** ++ ++ 1. Μετακινείστε τον δρομέα στην παρακάτω γραμμή σημειωμένη με ---> και ++ τοποθετήστε τον πάνω στο πρώτο λάθος. ++ 2. Πατήστε x για να διαγράψετε τον πρώτο ανεπιθύμητο χαρακτήρα. ++ 3. Τώρα πατήστε u για να αναιρέσετε την τελευταία εκτελεσμένη εντολή. ++ 4. Αυτή τη φορά διορθώστε όλα τα λάθη στη γραμμή χρησιμοποιώντας την εντολή x. ++ 5. Τώρα πατήστε ένα κεφαλαίο U για να επιστρέψετε τη γραμμή στην αρχική ++ της κατάσταση. ++ 6. Τώρα πατήστε u μερικές φορές για να αναιρέσετε την U και ++ προηγούμενες εντολές. ++ 7. Τώρα πατήστε CTRL-R (κρατώντας πατημένο το πλήκτρο CTRL καθώς πατάτε το R) ++ μερικές φορές για να επαναφέρετε τις εντολές (αναίρεση των αναιρέσεων). ++ ++ ---> Fiix the errors oon thhis line and reeplace them witth undo. ++ ++ 8. Αυτές είναι πολύ χρήσιμες εντολές. Τώρα πηγαίνετε στην ++ Περίληψη του Μαθήματος 2. ++ ++ ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ ++ ΜΑΘΗΜΑ 2 ΠΕΡΙΛΗΨΗ ++ ++ ++ 1. Για να διαγράψετε από τον δρομέα μέχρι το τέλος λέξης γράψτε: dw ++ ++ 2. Για να διαγράψετε από τον δρομέα μέχρι το τέλος γραμμής γράψτε: d$ ++ ++ 3. Για να διαγράψετε ολόκληρη τη γραμμή γράψτε: dd ++ ++ 4. Η μορφή για μία εντολή στην Κανονική Κατάσταση είναι: ++ ++ [αριθμός] εντολή αντικείμενο Ή εντολή [αριθμός] αντικείμενο ++ όπου: ++ αριθμός - πόσες φορές να επαναληφθεί η εντολή ++ εντολή - τι να γίνει, όπως η d για διαγραφή ++ αντικείμενο - πάνω σε τι να ενεργήσει η εντολή, όπως w (λέξη), ++ $ (τέλος της γραμμής), κτλ. ++ ++ 5. Για να αναιρέσετε προηγούμενες ενέργειες, πατήστε: u (πεζό u) ++ Για να αναιρέσετε όλες τις αλλαγές στη γραμμή, πατήστε: U (κεφαλαίο U) ++ Για να αναιρέσετε τις αναιρέσεις, πατήστε: CTRL-R ++ ++ ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ ++ Μάθημα 3.1: Η ΕΝΤΟΛΗ ΤΟΠΟΘΕΤΗΣΗΣ ++ ++ ++ ** Πατήστε p για να τοποθετήσετε την τελευταία διαγραφή μετά τον δρομέα. ** ++ ++ 1. Μετακινείστε τον δρομέα στην πρώτη γραμμή της παρακάτω ομάδας. ++ ++ 2. Πατήστε dd για να διαγράψετε τη γραμμή και να την αποθηκεύσετε σε ++ προσωρινή μνήμη του Vim. ++ ++ 3. Μετακινείστε τον δρομέα στη γραμμή ΠΑΝΩ από εκεί που θα πρέπει να πάει ++ η διαγραμμένη γραμμή. ++ ++ 4. Όσο είστε σε Κανονική Κατάσταση, πατήστε p για να βάλετε τη γραμμή. ++ ++ 5. Επαναλάβετε τα βήματα 2 έως 4 για να βάλετε όλες τις γραμμές στη ++ σωστή σειρά. ++ ++ d) Can you learn too? ++ b) Violets are blue, ++ c) Intelligence is learned, ++ a) Roses are red, ++ ++ ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ ++ Μάθημα 3.2: Η ΕΝΤΟΛΗ ΑΝΤΙΚΑΤΑΣΤΑΣΗΣ ++ ++ ++ ** Πατήστε r και χαρακτήρα για να αλλάξετε αυτόν που είναι ++ κάτω από τον δρομέα. ** ++ ++ 1. Μετακινείστε τον δρομέα στην πρώτη γραμμή παρακάτω σημειωμένη με --->. ++ ++ 2. Μετακινείστε τον δρομέα έτσι ώστε να είναι πάνω στο πρώτο λάθος. ++ ++ 3. Πατήστε r και μετά τον χαρακτήρα ο οποίος διορθώνει το λάθος. ++ ++ 4. Επαναλάβετε τα βήματα 2 και 3 μέχρι να είναι σωστή η πρώτη γραμμή. ++ ++ ---> Whan this lime was tuoed in, someone presswd some wrojg keys! ++ ---> When this line was typed in, someone pressed some wrong keys! ++ ++ 5. Τώρα πηγαίνετε στο Μάθημα 3.2. ++ ++ ΣΗΜΕΙΩΣΗ: Να θυμάστε ότι πρέπει να μαθαίνετε με τη χρήση, και όχι με ++ την απομνημόνευση. ++ ++ ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ ++ Μάθημα 3.3: Η ΕΝΤΟΛΗ ΑΛΛΑΓΗΣ ++ ++ ** Για να αλλάξετε τμήμα ή όλη τη λέξη, πατήστε cw . ** ++ ++ 1. Μετακινείστε τον δρομέα στην πρώτη γραμμή παρακάτω σημειωμένη με --->. ++ ++ 2. Τοποθετήστε τον δρομέα πάνω στο u της λέξης lubw. ++ ++ 3. Πατήστε cw και τη σωστή λέξη (στην περίπτωση αυτή, γράψτε 'ine'.) ++ ++ 4. Πατήστε και πηγαίνετε στο επόμενο λάθος (στον πρώτο ++ χαρακτήρα προς αλλαγή). ++ ++ 5. Επαναλάβετε τα βήματα 3 και 4 μέχρις ότου η πρώτη πρόταση να είναι ++ ίδια με τη δεύτερη. ++ ++ ---> This lubw has a few wptfd that mrrf changing usf the change command. ++ ---> This line has a few words that need changing using the change command. ++ ++ Παρατηρείστε ότι η cw όχι μόνο αντικαθιστάει τη λέξη, αλλά σας εισάγει ++ επίσης σε παρεμβολή. ++ ++ ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ ++ Μάθημα 3.4: ΠΕΡΙΣΣΟΤΕΡΕΣ ΑΛΛΑΓΕΣ ΜΕ c ++ ++ ++ ** Η εντολή αλλαγής χρησιμοποιείται με τα ίδια αντικείμενα της διαγραφής. ** ++ ++ ++ 1. Η εντολή αλλαγής δουλεύει με τον ίδιο τρόπο όπως η διαγραφή. Η μορφή είναι: ++ ++ [αριθμός] c αντικείμενο Ή c [αριθμός] αντικείμενο ++ ++ 2. Τα αντικείμενα είναι πάλι τα ίδια, όπως w (λέξη), $ (τέλος γραμμής), κτλ. ++ ++ 3. Μετακινηθείτε στην πρώτη γραμμή παρακάτω σημειωμένη με --->. ++ ++ 4. Μετακινείστε τον δρομέα στο πρώτο λάθος. ++ ++ 5. Γράψτε c$ για να κάνετε το υπόλοιπο της γραμμής ίδιο με τη δεύτερη ++ και πατήστε . ++ ++ ---> The end of this line needs some help to make it like the second. ++ ---> The end of this line needs to be corrected using the c$ command. ++ ++ ++ ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ ++ ΜΑΘΗΜΑ 3 ΠΕΡΙΛΗΨΗ ++ ++ ++ 1. Για να τοποθετήσετε κείμενο που μόλις έχει διαγραφεί, πατήστε p . ++ Αυτό τοποθετεί το διαγραμμένο κείμενο ΜΕΤΑ τον δρομέα (αν διαγράφτηκε ++ γραμμή θα πάει μετά στη γραμμή κάτω από τον δρομέα. ++ ++ 2. Για να αντικαταστήσετε τον χαρακτήρα κάτω από τον δρομέα, πατήστε r ++ και μετά τον χαρακτήρα που θα αντικαταστήσει τον αρχικό. ++ ++ 3. Η εντολή αλλαγής σας επιτρέπει να αλλάξετε το καθορισμένο αντικείμενο ++ από τον δρομέα μέχρι το τέλος του αντικείμενο. Π.χ. γράψτε cw για να ++ αλλάξετε από τον δρομέα μέχρι το τέλος της λέξης, c$ για να αλλάξετε ++ μέχρι το τέλος γραμμής. ++ ++ 4. Η μορφή για την αλλαγή είναι: ++ ++ [αριθμός] c αντικείμενο Ή c [αριθμός] αντικείμενο ++ ++ Τώρα συνεχίστε με το επόμενο μάθημα. ++ ++ ++ ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ ++ Μάθημα 4.1: ΘΕΣΗ ΚΑΙ ΚΑΤΑΣΤΑΣΗ ΑΡΧΕΙΟΥ ++ ++ ++ ** Πατήστε CTRL-g για να εμφανιστεί η θέση σας στο αρχείο και η κατάστασή του. ++ Πατήστε SHIFT-G για να πάτε σε μία γραμμή στο αρχείο. ** ++ ++ Σημείωση: Διαβάστε ολόκληρο το μάθημα πριν εκτελέσετε κάποιο από τα βήματα!! ++ ++ 1. Κρατήστε πατημένο το πλήκτρο Ctrl και πατήστε g . Μία γραμμή κατάστασης ++ θα εμφανιστεί στο κάτω μέρος της σελίδας με το όνομα αρχείου και τη ++ γραμμή που είστε. Θυμηθείτε τον αριθμό γραμμής για το Βήμα 3. ++ ++ 2. Πατήστε shift-G για να μετακινηθείτε στο τέλος του αρχείου. ++ ++ 3. Πατήστε τον αριθμό της γραμμής που ήσασταν και μετά shift-G. Αυτό θα ++ σας επιστρέψει στη γραμμή που ήσασταν πριν πατήσετε για πρώτη φορά Ctrl-g. ++ (Όταν πληκτρολογείτε τους αριθμούς, ΔΕΝ θα εμφανίζονται στην οθόνη). ++ ++ 4. Αν νοιώθετε σίγουρος για αυτό, εκτελέστε τα βήματα 1 έως 3. ++ ++ ++ ++ ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ ++ Μάθημα 4.2: Η ΕΝΤΟΛΗ ΑΝΑΖΗΤΗΣΗΣ ++ ++ ++ ** Πατήστε / ακολουθούμενο από τη φράση που ψάχνετε. ** ++ ++ 1. Σε Κανονική Κατάσταση πατήστε τον χαρακτήρα / . Παρατηρήστε ότι αυτός και ++ ο δρομέας εμφανίζονται στο κάτω μέρος της οθόνης όπως με την εντολή : . ++ ++ 2. Τώρα γράψτε 'errroor' . Αυτή είναι η λέξη που θέλετε να ψάξετε. ++ ++ 3. Για να ψάξετε ξανά για την ίδια φράση, πατήστε απλώς n . ++ Για να ψάξετε την ίδια φράση στην αντίθετη κατεύθυνση, πατήστε Shift-N . ++ ++ 4. Αν θέλετε να ψάξετε για μία φράση προς τα πίσω, χρησιμοποιήστε την εντολή ? αντί της / . ++ ++ ---> Όταν η αναζήτηση φτάσει στο τέλος του αρχείου θα συνεχίσει από την αρχή. ++ ++ "errroor" is not the way to spell error; errroor is an error. ++ ++ ++ ++ ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ ++ Μάθημα 4.3: ΕΥΡΕΣΗ ΤΑΙΡΙΑΣΤΩΝ ΠΑΡΕΝΘΕΣΕΩΝ ++ ++ ++ ** Πατήστε % για να βρείτε την αντίστοιχη ), ], ή } . ** ++ ++ 1. Τοποθετήστε τον δρομέα σε κάποια (, [, ή { στην παρακάτω γραμμή ++ σημειωμένη με --->. ++ ++ 2. Τώρα πατήστε τον χαρακτήρα % . ++ ++ 3. Ο δρομέας θα πρέπει να είναι στην αντίστοιχη παρένθεση ή αγκύλη. ++ ++ 4. Πατήστε % για να μετακινήσετε τον δρομέα πίσω στην πρώτη αγκύλη ++ (του ζευγαριού). ++ ++ ---> This ( is a test line with ('s, ['s ] and {'s } in it. )) ++ ++ ΣΗΜΕΙΩΣΗ: Αυτό είναι πολύ χρήσιμο στην αποσφαλμάτωση ενός προγράμματος ++ με μη ταιριαστές παρενθέσεις! ++ ++ ++ ++ ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ ++ Μάθημα 4.4: ΕΝΑΣ ΤΡΟΠΟΣ ΓΙΑ ΑΛΛΑΓΗ ΛΑΘΩΝ ++ ++ ++ ** Γράψτε :s/old/new/g για να αλλάξετε το 'new' με το 'old'. ** ++ ++ 1. Μετακινείστε τον δρομέα στην παρακάτω γραμμή σημειωμένη με --->. ++ ++ 2. Γράψτε :s/thee/the . Σημειώστε ότι αυτή η εντολή αλλάζει μόνο ++ την πρώτη εμφάνιση στη γραμμή. ++ ++ 3. Τώρα γράψτε :s/thee/the/g εννοώντας γενική αντικατάσταση στη ++ γραμμή. Αυτό αλλάζει όλες τις εμφανίσεις επί της γραμμής. ++ ++ ---> thee best time to see thee flowers is in thee spring. ++ ++ 4. Για να αλλάξετε κάθε εμφάνιση μίας συμβολοσειράς μεταξύ δύο γραμμών, ++ γράψτε :#,#s/old/new/g όπου #,# οι αριθμοί των δύο γραμμών. ++ Γράψτε :%s/old/new/g για να αλλάξετε κάθε εμφάνιση σε όλο το αρχείο. ++ ++ ++ ++ ++ ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ ++ ΜΑΘΗΜΑ 4 ΠΕΡΙΛΗΨΗ ++ ++ ++ 1. Το Ctrl-g εμφανίζει τη θέση σας στο αρχείο και την κατάστασή του. ++ Το Shift-G πηγαίνει στο τέλος του αρχείου. Ένας αριθμός γραμμής ++ ακολουθούμενος από Shift-G πηγαίνει σε εκείνη τη γραμμή. ++ ++ 2. Γράφοντας / ακολουθούμενο από μία φράση ψάχνει προς τα ΜΠΡΟΣΤΑ για ++ τη φράση. Γράφοντας ? ακολουθούμενο από μία φράση ψάχνει προς τα ΠΙΣΩ ++ για τη φράση. Μετά από μία αναζήτηση πατήστε n για να βρείτε την ++ επόμενη εμφάνιση προς την ίδια κατεύθυνση ή Shift-N για να ψάξετε ++ προς την αντίθετη κατεύθυνση. ++ ++ 3. Πατώντας % όσο ο δρομέας είναι πάνω σε μία (,),[,],{, ή } εντοπίζει ++ το αντίστοιχο ταίρι του ζευγαριού. ++ ++ 4. Για αντικατάσταση με new του πρώτου old στη γραμμή γράψτε :s/old/new ++ Για αντικατάσταση με new όλων των 'old' στη γραμμή γράψτε :s/old/new/g ++ Για αντικατάσταση φράσεων μεταξύ δύο # γραμμών γράψτε :#,#s/old/new/g ++ Για αντικατάσταση όλων των εμφανίσεων στο αρχείο γράψτε :%s/old/new/g ++ Για ερώτηση επιβεβαίωσης κάθε φορά προσθέστε ένα 'c' "%s/old/new/gc ++ ++ ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ ++ Μάθημα 5.1: ΠΩΣ ΕΚΤΕΛΩ ΜΙΑ ΕΞΩΤΕΡΙΚΗ ΕΝΤΟΛΗ ++ ++ ++ ** Γράψτε :! ακολουθούμενο από μία εξωτερική εντολή για να την εκτελέσετε. ** ++ ++ 1. Πατήστε την οικεία εντολή : για να θέσετε τον δρομέα στο κάτω μέρος ++ της οθόνης. Αυτό σας επιτρέπει να δώσετε μία εντολή. ++ ++ 2. Τώρα πατήστε το ! (θαυμαστικό). Αυτό σας επιτρέπει να εκτελέσετε ++ οποιαδήποτε εξωτερική εντολή του φλοιού. ++ ++ 3. Σαν παράδειγμα γράψτε ls μετά από το ! και πατήστε . Αυτό θα ++ σας εμφανίσει μία λίστα του καταλόγου σας, ακριβώς σαν να ήσασταν στην ++ προτροπή του φλοιού. Ή χρησιμοποιήστε :!dir αν το ls δεν δουλεύει. ++ ++ ---> Σημείωση: Είναι δυνατόν να εκτελέσετε οποιαδήποτε εξωτερική εντολή ++ με αυτόν τον τρόπο. ++ ++ ---> Σημείωση: Όλες οι εντολές : πρέπει να τερματίζονται πατώντας το . ++ ++ ++ ++ ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ ++ Μάθημα 5.2: ΠΕΡΙΣΣΟΤΕΡΑ ΠΕΡΙ ΕΓΓΡΑΦΗΣ ΑΡΧΕΙΩΝ ++ ++ ++ ** Για να σώσετε τις αλλάγες που κάνατε στο αρχείο, γράψτε :w ΑΡΧΕΙΟ. ** ++ ++ 1. Γράψτε :!dir ή :!ls για να πάρετε μία λίστα του καταλόγου σας. ++ Ήδη ξέρετε ότι πρέπει να πατήσετε μετά από αυτό. ++ ++ 2. Διαλέξτε ένα όνομα αρχείου που δεν υπάρχει ακόμα, όπως το TEST. ++ ++ 3. Τώρα γράψτε: :w TEST (όπου TEST είναι το όνομα αρχείου που διαλέξατε). ++ ++ 4. Αυτό σώζει όλο το αρχείο (vim Tutor) με το όνομα TEST. Για να το ++ επαληθεύσετε, γράψτε ξανά :!dir για να δείτε τον κατάλογό σας. ++ ++ ---> Σημειώστε ότι αν βγαίνατε από τον Vim και μπαίνατε ξανά με το όνομα ++ αρχείου TEST, το αρχείο θα ήταν ακριβές αντίγραφο του tutor όταν το σώσατε. ++ ++ 5. Τώρα διαγράψτε το αρχείο γράφοντας (MS-DOS): :!del TEST ++ ++ ++ ++ ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ ++ Μάθημα 5.3: ΕΠΙΛΕΚΤΙΚΗ ΕΝΤΟΛΗ ΕΓΓΡΑΦΗΣ ++ ++ ++ ** Για να σώσετε τμήμα του αρχείου, γράψτε :#,# w ΑΡΧΕΙΟ ** ++ ++ 1. Άλλη μια φορά, γράψτε :!dir ή :!ls για να πάρετε μία λίστα από τον ++ κατάλογό σας και διαλέξτε ένα κατάλληλο όνομα αρχείου όπως το TEST. ++ ++ 2. Μετακινείστε τον δρομέα στο πάνω μέρος αυτής της σελίδας και πατήστε ++ Ctrl-g για να βρείτε τον αριθμό αυτής της γραμμής. ++ ΝΑ ΘΥΜΑΣΤΕ ΑΥΤΟΝ ΤΟΝ ΑΡΙΘΜΟ! ++ ++ 3. Τώρα πηγαίνετε στο κάτω μέρος της σελίδας και πατήστε Ctrl-g ξανά. ++ ΝΑ ΘΥΜΑΣΤΕ ΚΑΙ ΑΥΤΟΝ ΤΟΝ ΑΡΙΘΜΟ! ++ ++ 4. Για να σώσετε ΜΟΝΟ ένα τμήμα σε αρχείο, γράψτε :#,# w TEST ++ όπου #,# οι δύο αριθμοί που απομνημονεύσατε (πάνω,κάτω) και TEST το ++ όνομα του αρχείου σας. ++ ++ 5. Ξανά, δείτε ότι το αρχείο είναι εκεί με την :!dir αλλά ΜΗΝ το διαγράψετε. ++ ++ ++ ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ ++ Μάθημα 5.4: ΑΝΑΚΤΩΝΤΑΣ ΚΑΙ ΕΝΩΝΟΝΤΑΣ ΑΡΧΕΙΑ ++ ++ ++ ** Για να εισάγετε τα περιεχόμενα ενός αρχείου, γράψτε :r ΑΡΧΕΙΟ ** ++ ++ 1. Γράψτε :!dir για να βεβαιωθείτε ότι το TEST υπάρχει από πριν. ++ ++ 2. Τοποθετήστε τον δρομέα στο πάνω μέρος της σελίδας. ++ ++ ΣΗΜΕΙΩΣΗ: Αφότου εκτελέσετε το Βήμα 3 θα δείτε το Μάθημα 5.3. ++ Μετά κινηθείτε ΚΑΤΩ ξανά προς το μάθημα αυτό. ++ ++ 3. Τώρα ανακτήστε το αρχείο σας TEST χρησιμοποιώντας την εντολή :r TEST ++ όπου TEST είναι το όνομα του αρχείου. ++ ++ ΣΗΜΕΙΩΣΗ: Το αρχείο που ανακτάτε τοποθετείται ξεκινώντας εκεί που βρίσκεται ++ ο δρομέας. ++ ++ 4. Για να επαληθεύσετε ότι το αρχείο ανακτήθηκε, πίσω τον δρομέα και ++ παρατηρήστε ότι υπάρχουν τώρα δύο αντίγραφα του Μαθήματος 5.3, το ++ αρχικό και η έκδοση του αρχείου. ++ ++ ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ ++ ΜΑΘΗΜΑ 5 ΠΕΡΙΛΗΨΗ ++ ++ ++ 1. :!εντολή εκτελεί μία εξωτερική εντολή. ++ ++ Μερικά χρήσιμα παραδείγματα είναι (MS-DOS): ++ :!dir - εμφάνιση λίστας ενός καταλόγου. ++ :!del ΑΡΧΕΙΟ - διαγράφει το ΑΡΧΕΙΟ. ++ ++ 2. :w ΑΡΧΕΙΟ γράφει το τρέχων αρχείο του Vim στο δίσκο με όνομα ΑΡΧΕΙΟ. ++ ++ 3. :#,#w ΑΡΧΕΙΟ σώζει τις γραμμές από # μέχρι # στο ΑΡΧΕΙΟ. ++ ++ 4. :r ΑΡΧΕΙΟ ανακτεί το αρχείο δίσκου ΑΡΧΕΙΟ και το παρεμβάλλει μέσα ++ στο τρέχον αρχείο μετά από τη θέση του δρομέα. ++ ++ ++ ++ ++ ++ ++ ++ ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ ++ Μάθημα 6.1: Η ΕΝΤΟΛΗ ΑΝΟΙΓΜΑΤΟΣ ++ ++ ++ ** Πατήστε o για να ανοίξετε μία γραμμή κάτω από τον δρομέα και να ++ βρεθείτε σε Κατάσταση Κειμένου. ** ++ ++ 1. Μετακινείστε τον δρομέα στην παρακάτω γραμμή σημειωμένη με --->. ++ ++ 2. Πατήστε o (πεζό) για να ανοίξετε μία γραμμή ΚΑΤΩ από τον δρομέα και να ++ βρεθείτε σε Κατάσταση Κειμένου. ++ ++ 3. Τώρα αντιγράψτε τη σημειωμένη με ---> γραμμή και πατήστε για να ++ βγείτε από την Κατάσταση Κειμένου. ++ ++ ---> After typing o the cursor is placed on the open line in Insert mode. ++ ++ 4. Για να ανοίξετε μία γραμμή ΠΑΝΩ από τον δρομέα, πατήστε απλά ένα κεφαλαίο ++ O, αντί για ένα πεζό o. Δοκιμάστε το στην παρακάτω γραμμή. ++ Ανοίγετε γραμμή πάνω από αυτήν πατώντας Shift-O όσο ο δρομέας είναι στη γραμμή ++ ++ ++ ++ ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ ++ Μάθημα 6.2: Η ΕΝΤΟΛΗ ΠΡΟΣΘΗΚΗΣ ++ ++ ** Πατήστε a για να εισάγετε κείμενο ΜΕΤΑ τον δρομέα. ** ++ ++ 1. Μετακινείστε τον δρομέα στο τέλος της πρώτης γραμμής παρακάτω ++ σημειωμένη με ---> πατώντας $ στην Κανονική Κατάσταση. ++ ++ 2. Πατήστε ένα a (πεζό) για να προσθέσετε κείμενο ΜΕΤΑ από τον χαρακτήρα ++ που είναι κάτω από τον δρομέα. (Το κεφαλαίο A προσθέτει στο τέλος ++ της γραμμής). ++ ++ Σημείωση: Αυτό αποφεύγει το πάτημα του i , τον τελευταίο χαρακτήρα, το ++ κείμενο της εισαγωγής, , δρομέα-δεξιά, και τέλος, x, μόνο και ++ μόνο για να προσθέσετε στο τέλος της γραμμής! ++ ++ 3. Συμπληρώστε τώρα την πρώτη γραμμή. Σημειώστε επίσης ότι η προσθήκη είναι ++ ακριβώς ίδια στην Κατάσταση Κειμένου με την Κατάσταση Εισαγωγής, εκτός ++ από τη θέση που εισάγεται το κείμενο. ++ ++ ---> This line will allow you to practice ++ ---> This line will allow you to practice appending text to the end of a line. ++ ++ ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ ++ Μάθημα 6.3: ΑΛΛΗ ΕΚΔΟΣΗ ΤΗΣ ΑΝΤΙΚΑΤΑΣΤΑΣΗΣ ++ ++ ++ ** Πατήστε κεφαλαίο R για να αλλάξετε περισσότερους από έναν χαρακτήρες. ** ++ ++ 1. Μετακινείστε τον δρομέα στην πρώτη γραμμή παρακάτω σημειωμένη με --->. ++ ++ 2. Τοποθετήστε τον δρομέα στην αρχή της πρώτης λέξης που είναι διαφορετική ++ από τη δεύτερη γραμμή σημειωμένη με ---> (η λέξη 'last'). ++ ++ 3. Πατήστε τώρα R και αλλάξτε το υπόλοιπο του κειμένου στην πρώτη γραμμή ++ γράφοντας πάνω από το παλιό κείμενο ώστε να κάνετε την πρώτη γραμμή ίδια ++ με τη δεύτερη. ++ ++ ---> To make the first line the same as the last on this page use the keys. ++ ---> To make the first line the same as the second, type R and the new text. ++ ++ 4. Σημειώστε ότι όταν πατάτε για να βγείτε, παραμένει οποιοδήποτε ++ αναλλοίωτο κείμενο. ++ ++ ++ ++ ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ ++ Μάθημα 6.4: ΡΥΘΜΙΣΗ ΕΠΙΛΟΓΗΣ ++ ++ ++ ** Ρυθμίστε μία επιλογή έτσι ώστε η αναζήτηση ή η αντικατάσταση να αγνοεί ++ τη διαφορά πεζών-κεφαλαίων ** ++ ++ 1. Ψάξτε για 'ignore' εισάγοντας: ++ /ignore ++ Συνεχίστε αρκετές φορές πατώντας το πλήκτρο n. ++ ++ 2. Θέστε την επιλογή 'ic' (Ignore case) γράφοντας: ++ :set ic ++ ++ 3. Ψάξτε τώρα ξανά για 'ignore' πατώντας: n ++ Συνεχίστε την αναζήτηση μερικές ακόμα φορές πατώντας το πλήκτρο n ++ ++ 4. Θέστε τις επιλογές 'hlsearch' και 'incsearch': ++ :set hls is ++ ++ 5. Εισάγετε τώρα ξανά την εντολή αναζήτησης, και δείτε τι συμβαίνει ++ /ignore ++ ++ ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ ++ ΜΑΘΗΜΑ 6 ΠΕΡΙΛΗΨΗ ++ ++ ++ 1. Πατώντας o ανοίγει μία γραμμή ΚΑΤΩ από τον δρομέα και τοποθετεί τον ++ δρομέα στην ανοιχτή γραμμή σε Κατάσταση Κειμένου. ++ ++ 2. Πατήστε a για να εισάγετε κείμενο ΜΕΤΑ τον χαρακτήρα στον οποίο είναι ++ ο δρομέας. Πατώντας κεφαλαίο A αυτόματα προσθέτει κείμενο στο τέλος ++ της γραμμής. ++ ++ 3. Πατώντας κεφαλαίο R εισέρχεται στην Κατάσταη Αντικατάστασης μέχρι να ++ πατηθεί το και να εξέλθει. ++ ++ 4. Γράφοντας ":set xxx" ρυθμίζει την επιλογή "xxx". ++ ++ ++ ++ ++ ++ ++ ++ ++ ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ ++ ΜΑΘΗΜΑ 7: ON-LINE ΕΝΤΟΛΕΣ ΒΟΗΘΕΙΑΣ ++ ++ ++ ** Χρησιμοποιήστε το on-line σύστημα βοήθειας ** ++ ++ Ο Vim έχει ένα περιεκτικό on-line σύστημα βοήθειας. Για να ξεκινήσει, ++ δοκιμάστε κάποιο από τα τρία: ++ - πατήστε το πλήκτρο (αν έχετε κάποιο) ++ - πατήστε το πλήκτρο (αν έχετε κάποιο) ++ - γράψτε :help ++ ++ Γράψτε :q για να κλείσετε το παράθυρο της βοήθειας. ++ ++ Μπορείτε να βρείτε βοήθεια πάνω σε κάθε αντικείμενο, δίνοντας μία παράμετρο ++ στην εντολή ":help". Δοκιμάστε αυτά (μην ξεχνάτε να πατάτε ): ++ ++ :help w ++ :help c_ +! " Last Change: 2006 Sep 02 + + " This small source file is used for detecting if a translation of the + " tutor file exist, i.e., a tutor.xx file, where xx is the language. +--- 1,6 ---- + " Vim tutor support file + " Author: Eduardo F. Amatria +! " Last Change: 2006 Sep 09 + + " This small source file is used for detecting if a translation of the + " tutor file exist, i.e., a tutor.xx file, where xx is the language. +*************** +*** 93,101 **** + endif + endif + +! " The Greek tutor is available in two encodings, guess which one to use +! if s:ext =~? '\.gr' && &enc =~ 737 +! let s:ext = ".gr.cp737" + endif + + " The Slovak tutor is available in two encodings, guess which one to use +--- 93,108 ---- + endif + endif + +! " The Greek tutor is available in three encodings, guess what to use. +! " We used ".gr" (Greece) instead of ".el" (Greek); accept both. +! if s:ext =~? '\.gr\|\.el' +! if &enc == "iso-8859-7" +! let s:ext = ".gr" +! elseif &enc == "utf-8" +! let s:ext = ".gr.utf-8" +! elseif &enc =~ 737 +! let s:ext = ".gr.cp737" +! endif + endif + + " The Slovak tutor is available in two encodings, guess which one to use +*** ../vim-7.0.094/src/version.c Sat Sep 9 14:51:43 2006 +--- src/version.c Sun Sep 10 13:19:23 2006 +*************** +*** 668,669 **** +--- 668,671 ---- + { /* Add new patch number below this line */ ++ /**/ ++ 95, + /**/ + +-- +FATHER: You killed eight wedding guests in all! +LAUNCELOT: Er, Well ... the thing is ... I thought your son was a lady. +FATHER: I can understand that. + "Monty Python and the Holy Grail" PYTHON (MONTY) PICTURES LTD + + /// Bram Moolenaar -- Bram@Moolenaar.net -- http://www.Moolenaar.net \\\ +/// sponsor Vim, vote for features -- http://www.Vim.org/sponsor/ \\\ +\\\ download, build and distribute -- http://www.A-A-P.org /// + \\\ help me help AIDS victims -- http://ICCF-Holland.org /// --- vim-7.0.orig/upstream/patches/7.0.108 +++ vim-7.0/upstream/patches/7.0.108 @@ -0,0 +1,88 @@ +To: vim-dev@vim.org +Subject: Patch 7.0.108 (extra) +Fcc: outbox +From: Bram Moolenaar +Mime-Version: 1.0 +Content-Type: text/plain; charset=ISO-8859-1 +Content-Transfer-Encoding: 8bit +------------ + +Patch 7.0.108 (extra) +Problem: Amiga: Compilation problem. +Solution: Have mch_mkdir() return a failure flag. (Willy Catteau) +Files: src/os_amiga.c, src/proto/os_amiga.pro + + +*** ../vim-7.0.107/src/os_amiga.c Tue Mar 7 23:38:27 2006 +--- src/os_amiga.c Thu Sep 14 21:29:03 2006 +*************** +*** 799,805 **** + /* + * Create directory "name". + */ +! void + mch_mkdir(name) + char_u *name; + { +--- 799,805 ---- + /* + * Create directory "name". + */ +! int + mch_mkdir(name) + char_u *name; + { +*************** +*** 807,813 **** +--- 807,817 ---- + + lock = CreateDir(name); + if (lock != NULL) ++ { + UnLock(lock); ++ return 0; ++ } ++ return -1; + } + + /* +*** ../vim-7.0.107/src/proto/os_amiga.pro Fri Mar 24 22:41:43 2006 +--- src/proto/os_amiga.pro Thu Sep 14 21:29:32 2006 +*************** +*** 25,31 **** + extern int mch_setperm __ARGS((char_u *name, long perm)); + extern void mch_hide __ARGS((char_u *name)); + extern int mch_isdir __ARGS((char_u *name)); +! extern void mch_mkdir __ARGS((char_u *name)); + extern int mch_can_exe __ARGS((char_u *name)); + extern int mch_nodetype __ARGS((char_u *name)); + extern void mch_early_init __ARGS((void)); +--- 25,31 ---- + extern int mch_setperm __ARGS((char_u *name, long perm)); + extern void mch_hide __ARGS((char_u *name)); + extern int mch_isdir __ARGS((char_u *name)); +! extern int mch_mkdir __ARGS((char_u *name)); + extern int mch_can_exe __ARGS((char_u *name)); + extern int mch_nodetype __ARGS((char_u *name)); + extern void mch_early_init __ARGS((void)); +*** ../vim-7.0.107/src/version.c Thu Sep 14 21:04:09 2006 +--- src/version.c Thu Sep 14 21:34:33 2006 +*************** +*** 668,669 **** +--- 668,671 ---- + { /* Add new patch number below this line */ ++ /**/ ++ 108, + /**/ + +-- +BEDEVERE: Look! It's the old man from scene 24 - what's he Doing here? +ARTHUR: He is the keeper of the Bridge. He asks each traveler five + questions ... +GALAHAD: Three questions. + "Monty Python and the Holy Grail" PYTHON (MONTY) PICTURES LTD + + /// Bram Moolenaar -- Bram@Moolenaar.net -- http://www.Moolenaar.net \\\ +/// sponsor Vim, vote for features -- http://www.Vim.org/sponsor/ \\\ +\\\ download, build and distribute -- http://www.A-A-P.org /// + \\\ help me help AIDS victims -- http://ICCF-Holland.org /// --- vim-7.0.orig/upstream/patches/7.0.017 +++ vim-7.0/upstream/patches/7.0.017 @@ -0,0 +1,64 @@ +To: vim-dev@vim.org +Subject: Patch 7.0.017 +Fcc: outbox +From: Bram Moolenaar +Mime-Version: 1.0 +Content-Type: text/plain; charset=ISO-8859-1 +Content-Transfer-Encoding: 8bit +------------ + +Patch 7.0.017 (after 7.0.014) +Problem: Linking gui_xmebw.c fails on Dec Alpha Tru64. (Rolfe) +Solution: Adjust defines for Motif 1.2 and older. +Files: src/gui_xmebw.c + + +*** ../vim-7.0.016/src/gui_xmebw.c Fri May 12 19:24:33 2006 +--- src/gui_xmebw.c Sat May 13 12:55:01 2006 +*************** +*** 47,59 **** + #include "gui_xmebwp.h" + + /* Provide some missing wrappers, which are missed from the LessTif +! * implementation. + * + * We neither use XmeGetPixmapData or _XmGetPixmapData, since with LessTif the + * pixmap will not appear in it's caches properly. We cache the interresting + * values in XmEnhancedButtonPart instead ourself. + */ +! #ifdef LESSTIF_VERSION + # ifndef Lab_IsMenupane + # define Lab_IsMenupane(w) (Lab_MenuType(w) == (int)XmMENU_POPUP || \ + Lab_MenuType(w) == (int)XmMENU_PULLDOWN) +--- 47,59 ---- + #include "gui_xmebwp.h" + + /* Provide some missing wrappers, which are missed from the LessTif +! * implementation. Also missing in Motif 1.2 and earlier. + * + * We neither use XmeGetPixmapData or _XmGetPixmapData, since with LessTif the + * pixmap will not appear in it's caches properly. We cache the interresting + * values in XmEnhancedButtonPart instead ourself. + */ +! #if defined(LESSTIF_VERSION) || (XmVersion <= 1002) + # ifndef Lab_IsMenupane + # define Lab_IsMenupane(w) (Lab_MenuType(w) == (int)XmMENU_POPUP || \ + Lab_MenuType(w) == (int)XmMENU_PULLDOWN) +*** ../vim-7.0.016/src/version.c Sat May 13 09:16:38 2006 +--- src/version.c Sat May 13 13:00:03 2006 +*************** +*** 668,669 **** +--- 668,671 ---- + { /* Add new patch number below this line */ ++ /**/ ++ 17, + /**/ + +-- +hundred-and-one symptoms of being an internet addict: +141. You'd rather go to http://www.weather.com/ than look out your window. + + /// Bram Moolenaar -- Bram@Moolenaar.net -- http://www.Moolenaar.net \\\ +/// sponsor Vim, vote for features -- http://www.Vim.org/sponsor/ \\\ +\\\ download, build and distribute -- http://www.A-A-P.org /// + \\\ help me help AIDS victims -- http://ICCF-Holland.org /// --- vim-7.0.orig/upstream/patches/7.0.111 +++ vim-7.0/upstream/patches/7.0.111 @@ -0,0 +1,336 @@ +To: vim-dev@vim.org +Subject: Patch 7.0.111 +Fcc: outbox +From: Bram Moolenaar +Mime-Version: 1.0 +Content-Type: text/plain; charset=ISO-8859-1 +Content-Transfer-Encoding: 8bit +------------ + +Patch 7.0.111 +Problem: The gzip plugin can't handle filenames with single quotes. +Solution: Add and use the shellescape() function. (partly by Alexey Froloff) +Files: runtime/autoload/gzip.vim, runtime/doc/eval.txt, src/eval.c, + src/mbyte.c, src/misc2.c, src/proto/misc2.pro + + +*** ../vim-7.0.110/runtime/autoload/gzip.vim Tue Aug 8 19:55:06 2006 +--- runtime/autoload/gzip.vim Tue Oct 3 14:39:29 2006 +*************** +*** 1,6 **** + " Vim autoload file for editing compressed files. + " Maintainer: Bram Moolenaar +! " Last Change: 2006 Jul 19 + + " These functions are used by the gzip plugin. + +--- 1,6 ---- + " Vim autoload file for editing compressed files. + " Maintainer: Bram Moolenaar +! " Last Change: 2006 Oct 03 + + " These functions are used by the gzip plugin. + +*************** +*** 68,76 **** + let tmp = tempname() + let tmpe = tmp . "." . expand(":e") + " write the just read lines to a temp file "'[,']w tmp.gz" +! execute "silent '[,']w " . tmpe + " uncompress the temp file: call system("gzip -dn tmp.gz") +! call system(a:cmd . " " . tmpe) + if !filereadable(tmp) + " uncompress didn't work! Keep the compressed file then. + echoerr "Error: Could not read uncompressed file" +--- 68,76 ---- + let tmp = tempname() + let tmpe = tmp . "." . expand(":e") + " write the just read lines to a temp file "'[,']w tmp.gz" +! execute "silent '[,']w " . escape(tmpe, ' ') + " uncompress the temp file: call system("gzip -dn tmp.gz") +! call system(a:cmd . " " . s:escape(tmpe)) + if !filereadable(tmp) + " uncompress didn't work! Keep the compressed file then. + echoerr "Error: Could not read uncompressed file" +*************** +*** 127,135 **** + let nmt = s:tempname(nm) + if rename(nm, nmt) == 0 + if exists("b:gzip_comp_arg") +! call system(a:cmd . " " . b:gzip_comp_arg . " '" . nmt . "'") + else +! call system(a:cmd . " '" . nmt . "'") + endif + call rename(nmt . "." . expand(":e"), nm) + endif +--- 127,135 ---- + let nmt = s:tempname(nm) + if rename(nm, nmt) == 0 + if exists("b:gzip_comp_arg") +! call system(a:cmd . " " . b:gzip_comp_arg . " " . s:escape(nmt)) + else +! call system(a:cmd . " " . s:escape(nmt)) + endif + call rename(nmt . "." . expand(":e"), nm) + endif +*************** +*** 154,163 **** + if rename(nm, nmte) == 0 + if &patchmode != "" && getfsize(nm . &patchmode) == -1 + " Create patchmode file by creating the decompressed file new +! call system(a:cmd . " -c " . nmte . " > " . nmt) + call rename(nmte, nm . &patchmode) + else +! call system(a:cmd . " " . nmte) + endif + call rename(nmt, nm) + endif +--- 154,163 ---- + if rename(nm, nmte) == 0 + if &patchmode != "" && getfsize(nm . &patchmode) == -1 + " Create patchmode file by creating the decompressed file new +! call system(a:cmd . " -c " . s:escape(nmte) . " > " . s:escape(nmt)) + call rename(nmte, nm . &patchmode) + else +! call system(a:cmd . " " . s:escape(nmte)) + endif + call rename(nmt, nm) + endif +*************** +*** 173,178 **** +--- 173,186 ---- + return fn + endif + return fnamemodify(a:name, ":p:h") . "/X~=@l9q5" ++ endfun ++ ++ fun s:escape(name) ++ " shellescape() was added by patch 7.0.111 ++ if v:version > 700 || (v:version == 700 && has('patch111')) ++ return shellescape(a:name) ++ endif ++ return "'" . a:name . "'" + endfun + + " vim: set sw=2 : +*** ../vim-7.0.110/runtime/doc/eval.txt Sun May 7 17:08:32 2006 +--- runtime/doc/eval.txt Fri Sep 22 19:43:18 2006 +*************** +*** 1,4 **** +! *eval.txt* For Vim version 7.0. Last change: 2006 May 06 + + + VIM REFERENCE MANUAL by Bram Moolenaar +--- 1,4 ---- +! *eval.txt* For Vim version 7.0. Last change: 2006 Sep 22 + + + VIM REFERENCE MANUAL by Bram Moolenaar +*************** +*** 1709,1714 **** +--- 1715,1722 ---- + settabwinvar( {tabnr}, {winnr}, {varname}, {val}) set {varname} in window + {winnr} in tab page {tabnr} to {val} + setwinvar( {nr}, {varname}, {val}) set {varname} in window {nr} to {val} ++ shellescape( {string}) String escape {string} for use as shell ++ command argument + simplify( {filename}) String simplify filename as much as possible + sort( {list} [, {func}]) List sort {list}, using {func} to compare + soundfold( {word}) String sound-fold {word} +*************** +*** 4434,4439 **** +--- 4457,4477 ---- + :call setwinvar(1, "&list", 0) + :call setwinvar(2, "myvar", "foobar") + ++ shellescape({string}) *shellescape()* ++ Escape {string} for use as shell command argument. ++ On MS-Windows and MS-DOS, when 'shellslash' is not set, it ++ will enclose {string} double quotes and double all double ++ quotes within {string}. ++ For other systems, it will enclose {string} in single quotes ++ and replace all "'" with "'\''". ++ Example: > ++ :echo shellescape('c:\program files\vim') ++ < results in: ++ "c:\program files\vim" ~ ++ Example usage: > ++ :call system("chmod +x -- " . shellescape(expand("%"))) ++ ++ + simplify({filename}) *simplify()* + Simplify the file name as much as possible without changing + the meaning. Shortcuts (on MS-Windows) or symbolic links (on +*** ../vim-7.0.110/src/eval.c Sat Sep 9 12:05:39 2006 +--- src/eval.c Thu Sep 14 17:44:41 2006 +*************** +*** 622,627 **** +--- 622,628 ---- + static void f_setreg __ARGS((typval_T *argvars, typval_T *rettv)); + static void f_settabwinvar __ARGS((typval_T *argvars, typval_T *rettv)); + static void f_setwinvar __ARGS((typval_T *argvars, typval_T *rettv)); ++ static void f_shellescape __ARGS((typval_T *argvars, typval_T *rettv)); + static void f_simplify __ARGS((typval_T *argvars, typval_T *rettv)); + static void f_sort __ARGS((typval_T *argvars, typval_T *rettv)); + static void f_soundfold __ARGS((typval_T *argvars, typval_T *rettv)); +*************** +*** 7146,7151 **** +--- 7147,7153 ---- + {"setreg", 2, 3, f_setreg}, + {"settabwinvar", 4, 4, f_settabwinvar}, + {"setwinvar", 3, 3, f_setwinvar}, ++ {"shellescape", 1, 1, f_shellescape}, + {"simplify", 1, 1, f_simplify}, + {"sort", 1, 2, f_sort}, + {"soundfold", 1, 1, f_soundfold}, +*************** +*** 14602,14607 **** +--- 14604,14621 ---- + } + #endif + } ++ } ++ ++ /* ++ * "shellescape({string})" function ++ */ ++ static void ++ f_shellescape(argvars, rettv) ++ typval_T *argvars; ++ typval_T *rettv; ++ { ++ rettv->vval.v_string = vim_strsave_shellescape(get_tv_string(&argvars[0])); ++ rettv->v_type = VAR_STRING; + } + + /* +*** ../vim-7.0.110/src/misc2.c Thu May 4 23:50:56 2006 +--- src/misc2.c Tue Sep 26 23:13:57 2006 +*************** +*** 1229,1234 **** +--- 1229,1322 ---- + return escaped_string; + } + ++ #if defined(FEAT_EVAL) || defined(PROTO) ++ /* ++ * Escape "string" for use as a shell argument with system(). ++ * This uses single quotes, except when we know we need to use double qoutes ++ * (MS-DOS and MS-Windows without 'shellslash' set). ++ * Returns the result in allocated memory, NULL if we have run out. ++ */ ++ char_u * ++ vim_strsave_shellescape(string) ++ char_u *string; ++ { ++ unsigned length; ++ char_u *p; ++ char_u *d; ++ char_u *escaped_string; ++ ++ /* First count the number of extra bytes required. */ ++ length = STRLEN(string) + 3; /* two quotes and the trailing NUL */ ++ for (p = string; *p != NUL; mb_ptr_adv(p)) ++ { ++ # if defined(WIN32) || defined(WIN16) || defined(DOS) ++ if (!p_ssl) ++ { ++ if (*p == '"') ++ ++length; /* " -> "" */ ++ } ++ else ++ # endif ++ if (*p == '\'') ++ length += 3; /* ' => '\'' */ ++ } ++ ++ /* Allocate memory for the result and fill it. */ ++ escaped_string = alloc(length); ++ if (escaped_string != NULL) ++ { ++ d = escaped_string; ++ ++ /* add opening quote */ ++ # if defined(WIN32) || defined(WIN16) || defined(DOS) ++ if (!p_ssl) ++ *d++ = '"'; ++ else ++ # endif ++ *d++ = '\''; ++ ++ for (p = string; *p != NUL; ) ++ { ++ # if defined(WIN32) || defined(WIN16) || defined(DOS) ++ if (!p_ssl) ++ { ++ if (*p == '"') ++ { ++ *d++ = '"'; ++ *d++ = '"'; ++ ++p; ++ continue; ++ } ++ } ++ else ++ # endif ++ if (*p == '\'') ++ { ++ *d++='\''; ++ *d++='\\'; ++ *d++='\''; ++ *d++='\''; ++ ++p; ++ continue; ++ } ++ ++ MB_COPY_CHAR(p, d); ++ } ++ ++ /* add terminating quote and finish with a NUL */ ++ # if defined(WIN32) || defined(WIN16) || defined(DOS) ++ if (!p_ssl) ++ *d++ = '"'; ++ else ++ # endif ++ *d++ = '\''; ++ *d = NUL; ++ } ++ ++ return escaped_string; ++ } ++ #endif ++ + /* + * Like vim_strsave(), but make all characters uppercase. + * This uses ASCII lower-to-upper case translation, language independent. +*** ../vim-7.0.110/src/proto/misc2.pro Fri Mar 24 23:42:55 2006 +--- src/proto/misc2.pro Thu Sep 14 18:28:43 2006 +*************** +*** 29,34 **** +--- 29,35 ---- + extern char_u *vim_strnsave __ARGS((char_u *string, int len)); + extern char_u *vim_strsave_escaped __ARGS((char_u *string, char_u *esc_chars)); + extern char_u *vim_strsave_escaped_ext __ARGS((char_u *string, char_u *esc_chars, int cc, int bsl)); ++ extern char_u *vim_strsave_shellescape __ARGS((char_u *string)); + extern char_u *vim_strsave_up __ARGS((char_u *string)); + extern char_u *vim_strnsave_up __ARGS((char_u *string, int len)); + extern void vim_strup __ARGS((char_u *p)); +*** ../vim-7.0.110/src/version.c Tue Sep 26 13:49:41 2006 +--- src/version.c Tue Oct 3 14:36:40 2006 +*************** +*** 668,669 **** +--- 668,671 ---- + { /* Add new patch number below this line */ ++ /**/ ++ 111, + /**/ + +-- +The only way the average employee can speak to an executive is by taking a +second job as a golf caddie. + (Scott Adams - The Dilbert principle) + + /// Bram Moolenaar -- Bram@Moolenaar.net -- http://www.Moolenaar.net \\\ +/// sponsor Vim, vote for features -- http://www.Vim.org/sponsor/ \\\ +\\\ download, build and distribute -- http://www.A-A-P.org /// + \\\ help me help AIDS victims -- http://ICCF-Holland.org /// --- vim-7.0.orig/upstream/patches/7.0.031 +++ vim-7.0/upstream/patches/7.0.031 @@ -0,0 +1,58 @@ +To: vim-dev@vim.org +Subject: Patch 7.0.031 +Fcc: outbox +From: Bram Moolenaar +Mime-Version: 1.0 +Content-Type: text/plain; charset=ISO-8859-1 +Content-Transfer-Encoding: 8bit +------------ + +Patch 7.0.031 +Problem: When deleting a buffer the buffer-local mappings for Select mode + remain. +Solution: Add the Select mode bit to MAP_ALL_MODES. (Edwin Steiner) +Files: src/vim.h + + +*** ../vim-7.0.030/src/vim.h Thu Jun 22 19:47:11 2006 +--- src/vim.h Fri Jun 23 16:29:03 2006 +*************** +*** 585,591 **** + #define INSERT 0x10 /* Insert mode */ + #define LANGMAP 0x20 /* Language mapping, can be combined with + INSERT and CMDLINE */ +- #define MAP_ALL_MODES 0x3f /* all mode bits used for mapping */ + + #define REPLACE_FLAG 0x40 /* Replace mode flag */ + #define REPLACE (REPLACE_FLAG + INSERT) +--- 585,590 ---- +*************** +*** 604,609 **** +--- 603,611 ---- + #define SHOWMATCH (0x700 + INSERT) /* show matching paren */ + #define CONFIRM 0x800 /* ":confirm" prompt */ + #define SELECTMODE 0x1000 /* Select mode, only for mappings */ ++ ++ #define MAP_ALL_MODES (0x3f | SELECTMODE) /* all mode bits used for ++ * mapping */ + + /* directions */ + #define FORWARD 1 +*** ../vim-7.0.030/src/version.c Thu Jun 22 21:15:46 2006 +--- src/version.c Fri Jun 23 16:33:25 2006 +*************** +*** 668,669 **** +--- 668,671 ---- + { /* Add new patch number below this line */ ++ /**/ ++ 31, + /**/ + +-- +Why don't cannibals eat clowns? +Because they taste funny. + + /// Bram Moolenaar -- Bram@Moolenaar.net -- http://www.Moolenaar.net \\\ +/// sponsor Vim, vote for features -- http://www.Vim.org/sponsor/ \\\ +\\\ download, build and distribute -- http://www.A-A-P.org /// + \\\ help me help AIDS victims -- http://ICCF-Holland.org /// --- vim-7.0.orig/upstream/patches/7.0.137 +++ vim-7.0/upstream/patches/7.0.137 @@ -0,0 +1,70 @@ +To: vim-dev@vim.org +Subject: Patch 7.0.137 +Fcc: outbox +From: Bram Moolenaar +Mime-Version: 1.0 +Content-Type: text/plain; charset=ISO-8859-1 +Content-Transfer-Encoding: 8bit +------------ + +Patch 7.0.137 +Problem: Configure check for big features is wrong. +Solution: Change "==" to "=". (Martti Kuparinen) +Files: src/auto/configure, src/configure.in + + +*** ../vim-7.0.136/src/auto/configure Tue Oct 10 11:40:53 2006 +--- src/auto/configure Tue Oct 17 11:41:59 2006 +*************** +*** 15302,15308 **** + && test "x$GUITYPE" != "xCARBONGUI"; then + echo "$as_me:$LINENO: checking whether we need -framework Carbon" >&5 + echo $ECHO_N "checking whether we need -framework Carbon... $ECHO_C" >&6 +! if test "x$enable_multibyte" = "xyes" || test "x$features" == "xbig" \ + || test "x$features" = "xhuge"; then + LIBS="$LIBS -framework Carbon" + echo "$as_me:$LINENO: result: yes" >&5 +--- 15302,15308 ---- + && test "x$GUITYPE" != "xCARBONGUI"; then + echo "$as_me:$LINENO: checking whether we need -framework Carbon" >&5 + echo $ECHO_N "checking whether we need -framework Carbon... $ECHO_C" >&6 +! if test "x$enable_multibyte" = "xyes" || test "x$features" = "xbig" \ + || test "x$features" = "xhuge"; then + LIBS="$LIBS -framework Carbon" + echo "$as_me:$LINENO: result: yes" >&5 +*** ../vim-7.0.136/src/configure.in Tue Oct 10 11:40:53 2006 +--- src/configure.in Tue Oct 17 11:40:59 2006 +*************** +*** 2838,2844 **** + && test "x$GUITYPE" != "xCARBONGUI"; then + AC_MSG_CHECKING(whether we need -framework Carbon) + dnl check for MACOSX without Carbon GUI, but with FEAT_MBYTE +! if test "x$enable_multibyte" = "xyes" || test "x$features" == "xbig" \ + || test "x$features" = "xhuge"; then + LIBS="$LIBS -framework Carbon" + AC_MSG_RESULT(yes) +--- 2838,2844 ---- + && test "x$GUITYPE" != "xCARBONGUI"; then + AC_MSG_CHECKING(whether we need -framework Carbon) + dnl check for MACOSX without Carbon GUI, but with FEAT_MBYTE +! if test "x$enable_multibyte" = "xyes" || test "x$features" = "xbig" \ + || test "x$features" = "xhuge"; then + LIBS="$LIBS -framework Carbon" + AC_MSG_RESULT(yes) +*** ../vim-7.0.136/src/version.c Tue Oct 17 11:12:28 2006 +--- src/version.c Tue Oct 17 11:49:14 2006 +*************** +*** 668,669 **** +--- 668,671 ---- + { /* Add new patch number below this line */ ++ /**/ ++ 137, + /**/ + +-- +CVS sux, men don't like commitment + + /// Bram Moolenaar -- Bram@Moolenaar.net -- http://www.Moolenaar.net \\\ +/// sponsor Vim, vote for features -- http://www.Vim.org/sponsor/ \\\ +\\\ download, build and distribute -- http://www.A-A-P.org /// + \\\ help me help AIDS victims -- http://ICCF-Holland.org /// --- vim-7.0.orig/upstream/patches/7.0.047 +++ vim-7.0/upstream/patches/7.0.047 @@ -0,0 +1,64 @@ +To: vim-dev@vim.org +Subject: Patch 7.0.047 +Fcc: outbox +From: Bram Moolenaar +Mime-Version: 1.0 +Content-Type: text/plain; charset=ISO-8859-1 +Content-Transfer-Encoding: 8bit +------------ + +Patch 7.0.047 +Problem: When running configure the exit status is wrong. +Solution: Handle the exit status properly. (Matthew Woehlke) +Files: configure, src/configure + + +*** ../vim-7.0.046/configure Sun Jun 13 21:32:42 2004 +--- configure Mon Jul 10 20:26:26 2006 +*************** +*** 3,6 **** + # This is just a stub for the Unix configure script, to provide support for + # doing "./configure" in the top Vim directory. + +! cd src && ./configure "$@" +--- 3,6 ---- + # This is just a stub for the Unix configure script, to provide support for + # doing "./configure" in the top Vim directory. + +! cd src && exec ./configure "$@" +*** ../vim-7.0.046/src/configure Thu Dec 22 23:38:38 2005 +--- src/configure Mon Jul 10 20:26:53 2006 +*************** +*** 2,6 **** +--- 2,10 ---- + # run the automatically generated configure script + CONFIG_STATUS=auto/config.status \ + auto/configure "$@" --srcdir="${srcdir:-.}" --cache-file=auto/config.cache ++ result=$? ++ + # Stupid autoconf 2.5x causes this file to be left behind. + if test -f configure.lineno; then rm -f configure.lineno; fi ++ ++ exit $result +*** ../vim-7.0.046/src/version.c Tue Aug 8 18:08:54 2006 +--- src/version.c Tue Aug 8 19:09:54 2006 +*************** +*** 668,669 **** +--- 668,671 ---- + { /* Add new patch number below this line */ ++ /**/ ++ 47, + /**/ + +-- +The primary purpose of the DATA statement is to give names to constants; +instead of referring to pi as 3.141592653589793 at every appearance, the +variable PI can be given that value with a DATA statement and used instead +of the longer form of the constant. This also simplifies modifying the +program, should the value of pi change. + -- FORTRAN manual for Xerox Computers + + /// Bram Moolenaar -- Bram@Moolenaar.net -- http://www.Moolenaar.net \\\ +/// sponsor Vim, vote for features -- http://www.Vim.org/sponsor/ \\\ +\\\ download, build and distribute -- http://www.A-A-P.org /// + \\\ help me help AIDS victims -- http://ICCF-Holland.org /// --- vim-7.0.orig/upstream/patches/7.0.104 +++ vim-7.0/upstream/patches/7.0.104 @@ -0,0 +1,89 @@ +To: vim-dev@vim.org +Subject: Patch 7.0.104 +Fcc: outbox +From: Bram Moolenaar +Mime-Version: 1.0 +Content-Type: text/plain; charset=ISO-8859-1 +Content-Transfer-Encoding: 8bit +------------ + +Patch 7.0.104 +Problem: The CursorHoldI event only triggers once in Insert mode. It also + triggers after CTRL-V and other two-key commands. +Solution: Set "did_cursorhold" before getting a second key. Reset + "did_cursorhold" after handling a command. +Files: src/edit.c, src/fileio.c + + +*** ../vim-7.0.103/src/edit.c Tue Aug 29 18:36:55 2006 +--- src/edit.c Tue Sep 12 21:12:10 2006 +*************** +*** 707,712 **** +--- 707,717 ---- + lastc = c; /* remember previous char for CTRL-D */ + c = safe_vgetc(); + ++ #ifdef FEAT_AUTOCMD ++ /* Don't want K_CURSORHOLD for the second key, e.g., after CTRL-V. */ ++ did_cursorhold = TRUE; ++ #endif ++ + #ifdef FEAT_RIGHTLEFT + if (p_hkmap && KeyTyped) + c = hkmap(c); /* Hebrew mode mapping */ +*************** +*** 1388,1393 **** +--- 1393,1404 ---- + #endif + break; + } /* end of switch (c) */ ++ ++ #ifdef FEAT_AUTOCMD ++ /* If typed something may trigger CursorHoldI again. */ ++ if (c != K_CURSORHOLD) ++ did_cursorhold = FALSE; ++ #endif + + /* If the cursor was moved we didn't just insert a space */ + if (arrow_used) +*** ../vim-7.0.103/src/fileio.c Sat Sep 9 14:51:43 2006 +--- src/fileio.c Tue Sep 12 20:58:55 2006 +*************** +*** 8289,8295 **** + { + int state; + +! if (!did_cursorhold && has_cursorhold() && !Recording) + { + state = get_real_state(); + if (state == NORMAL_BUSY || (state & INSERT) != 0) +--- 8289,8299 ---- + { + int state; + +! if (!did_cursorhold && has_cursorhold() && !Recording +! #ifdef FEAT_INS_EXPAND +! && !ins_compl_active() +! #endif +! ) + { + state = get_real_state(); + if (state == NORMAL_BUSY || (state & INSERT) != 0) +*** ../vim-7.0.103/src/version.c Thu Sep 14 10:48:00 2006 +--- src/version.c Thu Sep 14 11:05:33 2006 +*************** +*** 668,669 **** +--- 668,671 ---- + { /* Add new patch number below this line */ ++ /**/ ++ 104, + /**/ + +-- +A hamburger walks into a bar, and the bartender says: "I'm sorry, +but we don't serve food here." + + /// Bram Moolenaar -- Bram@Moolenaar.net -- http://www.Moolenaar.net \\\ +/// sponsor Vim, vote for features -- http://www.Vim.org/sponsor/ \\\ +\\\ download, build and distribute -- http://www.A-A-P.org /// + \\\ help me help AIDS victims -- http://ICCF-Holland.org /// --- vim-7.0.orig/upstream/patches/7.0.096 +++ vim-7.0/upstream/patches/7.0.096 @@ -0,0 +1,82 @@ +To: vim-dev@vim.org +Subject: Patch 7.0.096 +Fcc: outbox +From: Bram Moolenaar +Mime-Version: 1.0 +Content-Type: text/plain; charset=ISO-8859-1 +Content-Transfer-Encoding: 8bit +------------ + +Patch 7.0.096 +Problem: taglist() returns the filename relative to the tags file, while + the directory of the tags file is unknown. (Hari Krishna Dara) +Solution: Expand the file name. (Yegappan Lakshmanan) +Files: src/tag.c + + +*** ../vim-7.0.095/src/tag.c Thu Apr 27 23:40:34 2006 +--- src/tag.c Sun Sep 10 13:42:41 2006 +*************** +*** 3787,3792 **** +--- 3787,3793 ---- + { + int num_matches, i, ret; + char_u **matches, *p; ++ char_u *full_fname; + dict_T *dict; + tagptrs_T tp; + long is_static; +*************** +*** 3809,3823 **** + if (list_append_dict(list, dict) == FAIL) + ret = FAIL; + + if (add_tag_field(dict, "name", tp.tagname, tp.tagname_end) == FAIL +! || add_tag_field(dict, "filename", tp.fname, +! tp.fname_end) == FAIL + || add_tag_field(dict, "cmd", tp.command, + tp.command_end) == FAIL + || add_tag_field(dict, "kind", tp.tagkind, + tp.tagkind_end) == FAIL + || dict_add_nr_str(dict, "static", is_static, NULL) == FAIL) + ret = FAIL; + + if (tp.command_end != NULL) + { +--- 3810,3827 ---- + if (list_append_dict(list, dict) == FAIL) + ret = FAIL; + ++ full_fname = tag_full_fname(&tp); + if (add_tag_field(dict, "name", tp.tagname, tp.tagname_end) == FAIL +! || add_tag_field(dict, "filename", full_fname, +! NULL) == FAIL + || add_tag_field(dict, "cmd", tp.command, + tp.command_end) == FAIL + || add_tag_field(dict, "kind", tp.tagkind, + tp.tagkind_end) == FAIL + || dict_add_nr_str(dict, "static", is_static, NULL) == FAIL) + ret = FAIL; ++ ++ vim_free(full_fname); + + if (tp.command_end != NULL) + { +*** ../vim-7.0.095/src/version.c Sun Sep 10 13:22:26 2006 +--- src/version.c Sun Sep 10 13:52:01 2006 +*************** +*** 668,669 **** +--- 668,671 ---- + { /* Add new patch number below this line */ ++ /**/ ++ 96, + /**/ + +-- +The early bird gets the worm. If you want something else for +breakfast, get up later. + + /// Bram Moolenaar -- Bram@Moolenaar.net -- http://www.Moolenaar.net \\\ +/// sponsor Vim, vote for features -- http://www.Vim.org/sponsor/ \\\ +\\\ download, build and distribute -- http://www.A-A-P.org /// + \\\ help me help AIDS victims -- http://ICCF-Holland.org /// --- vim-7.0.orig/upstream/patches/7.0.125 +++ vim-7.0/upstream/patches/7.0.125 @@ -0,0 +1,72 @@ +To: vim-dev@vim.org +Subject: Patch 7.0.125 +Fcc: outbox +From: Bram Moolenaar +Mime-Version: 1.0 +Content-Type: text/plain; charset=ISO-8859-1 +Content-Transfer-Encoding: 8bit +------------ + +Patch 7.0.125 +Problem: When "autoselect" is in the 'clipboard' option then the '< and '> + marks are set while Visual mode is still active. +Solution: Don't set the '< and '> marks when yanking the selected area for + the clipboard. +Files: src/normal.c + + +*** ../vim-7.0.124/src/normal.c Tue Aug 29 17:28:56 2006 +--- src/normal.c Sat Oct 7 14:11:26 2006 +*************** +*** 1477,1490 **** + } + else if (VIsual_active) + { +! /* Save the current VIsual area for '< and '> marks, and "gv" */ +! curbuf->b_visual.vi_start = VIsual; +! curbuf->b_visual.vi_end = curwin->w_cursor; +! curbuf->b_visual.vi_mode = VIsual_mode; +! curbuf->b_visual.vi_curswant = curwin->w_curswant; + # ifdef FEAT_EVAL +! curbuf->b_visual_mode_eval = VIsual_mode; + # endif + + /* In Select mode, a linewise selection is operated upon like a + * characterwise selection. */ +--- 1477,1493 ---- + } + else if (VIsual_active) + { +! if (!gui_yank) +! { +! /* Save the current VIsual area for '< and '> marks, and "gv" */ +! curbuf->b_visual.vi_start = VIsual; +! curbuf->b_visual.vi_end = curwin->w_cursor; +! curbuf->b_visual.vi_mode = VIsual_mode; +! curbuf->b_visual.vi_curswant = curwin->w_curswant; + # ifdef FEAT_EVAL +! curbuf->b_visual_mode_eval = VIsual_mode; + # endif ++ } + + /* In Select mode, a linewise selection is operated upon like a + * characterwise selection. */ +*** ../vim-7.0.124/src/version.c Tue Oct 10 12:56:09 2006 +--- src/version.c Tue Oct 10 13:25:27 2006 +*************** +*** 668,669 **** +--- 668,671 ---- + { /* Add new patch number below this line */ ++ /**/ ++ 125, + /**/ + +-- +How To Keep A Healthy Level Of Insanity: +15. Five days in advance, tell your friends you can't attend their + party because you're not in the mood. + + /// Bram Moolenaar -- Bram@Moolenaar.net -- http://www.Moolenaar.net \\\ +/// sponsor Vim, vote for features -- http://www.Vim.org/sponsor/ \\\ +\\\ download, build and distribute -- http://www.A-A-P.org /// + \\\ help me help AIDS victims -- http://ICCF-Holland.org /// --- vim-7.0.orig/upstream/patches/7.0.099 +++ vim-7.0/upstream/patches/7.0.099 @@ -0,0 +1,70 @@ +To: vim-dev@vim.org +Subject: Patch 7.0.099 +Fcc: outbox +From: Bram Moolenaar +Mime-Version: 1.0 +Content-Type: text/plain; charset=ISO-8859-1 +Content-Transfer-Encoding: 8bit +------------ + +Patch 7.0.099 +Problem: GUI: When the popup menu is visible using the scrollbar messes up + the display. +Solution: Disallow scrolling the current window. Redraw the popup menu + after scrolling another window. +Files: src/gui.c + + +*** ../vim-7.0.098/src/gui.c Tue Aug 29 18:16:37 2006 +--- src/gui.c Sun Sep 10 21:28:57 2006 +*************** +*** 3734,3739 **** +--- 3734,3745 ---- + if (dont_scroll || input_available()) + return; + #endif ++ #ifdef FEAT_INS_EXPAND ++ /* Disallow scrolling the current window when the completion popup menu is ++ * visible. */ ++ if ((sb->wp == NULL || sb->wp == curwin) && pum_visible()) ++ return; ++ #endif + + #ifdef FEAT_RIGHTLEFT + if (sb->wp == NULL && curwin->w_p_rl) +*************** +*** 4207,4212 **** +--- 4213,4224 ---- + redraw_win_later(wp, VALID); + updateWindow(wp); /* update window, status line, and cmdline */ + } ++ ++ #ifdef FEAT_INS_EXPAND ++ /* May need to redraw the popup menu. */ ++ if (pum_visible()) ++ pum_redraw(); ++ #endif + + return (wp == curwin && !equalpos(curwin->w_cursor, old_cursor)); + } +*** ../vim-7.0.098/src/version.c Sun Sep 10 21:05:39 2006 +--- src/version.c Sun Sep 10 21:35:27 2006 +*************** +*** 668,669 **** +--- 668,671 ---- + { /* Add new patch number below this line */ ++ /**/ ++ 99, + /**/ + +-- +FATHER: We are here today to witness the union of two young people in the + joyful bond of the holy wedlock. Unfortunately, one of them, my son + Herbert, has just fallen to his death. + [Murmurs from CROWD; the BRIDE smiles with relief, coughs.] + "Monty Python and the Holy Grail" PYTHON (MONTY) PICTURES LTD + + /// Bram Moolenaar -- Bram@Moolenaar.net -- http://www.Moolenaar.net \\\ +/// sponsor Vim, vote for features -- http://www.Vim.org/sponsor/ \\\ +\\\ download, build and distribute -- http://www.A-A-P.org /// + \\\ help me help AIDS victims -- http://ICCF-Holland.org /// --- vim-7.0.orig/upstream/patches/7.0.129 +++ vim-7.0/upstream/patches/7.0.129 @@ -0,0 +1,86 @@ +To: vim-dev@vim.org +Subject: Patch 7.0.129 +Fcc: outbox +From: Bram Moolenaar +Mime-Version: 1.0 +Content-Type: text/plain; charset=ISO-8859-1 +Content-Transfer-Encoding: 8bit +------------ + +Patch 7.0.129 +Problem: GTK GUI: the GTK file dialog can't handle a relative path. +Solution: Make the initial directory a full path before passing it to GTK. + (James Vega) Also postpone adding the default file name until + after setting the directory. +Files: src/gui_gtk.c + + +*** ../vim-7.0.128/src/gui_gtk.c Tue Aug 29 17:28:56 2006 +--- src/gui_gtk.c Tue Oct 10 18:16:00 2006 +*************** +*** 1275,1292 **** + title = CONVERT_TO_UTF8(title); + # endif + +! /* Concatenate "initdir" and "dflt". */ + if (initdir == NULL || *initdir == NUL) + mch_dirname(dirbuf, MAXPATHL); +! else if (STRLEN(initdir) + 2 < MAXPATHL) +! STRCPY(dirbuf, initdir); +! else + dirbuf[0] = NUL; + /* Always need a trailing slash for a directory. */ + add_pathsep(dirbuf); +- if (dflt != NULL && *dflt != NUL +- && STRLEN(dirbuf) + 2 + STRLEN(dflt) < MAXPATHL) +- STRCAT(dirbuf, dflt); + + /* If our pointer is currently hidden, then we should show it. */ + gui_mch_mousehide(FALSE); +--- 1275,1287 ---- + title = CONVERT_TO_UTF8(title); + # endif + +! /* GTK has a bug, it only works with an absolute path. */ + if (initdir == NULL || *initdir == NUL) + mch_dirname(dirbuf, MAXPATHL); +! else if (vim_FullName(initdir, dirbuf, MAXPATHL - 2, FALSE) == FAIL) + dirbuf[0] = NUL; + /* Always need a trailing slash for a directory. */ + add_pathsep(dirbuf); + + /* If our pointer is currently hidden, then we should show it. */ + gui_mch_mousehide(FALSE); +*************** +*** 1340,1345 **** +--- 1335,1345 ---- + } + else + gtk_window_set_title(GTK_WINDOW(gui.filedlg), (const gchar *)title); ++ ++ /* Concatenate "initdir" and "dflt". */ ++ if (dflt != NULL && *dflt != NUL ++ && STRLEN(dirbuf) + 2 + STRLEN(dflt) < MAXPATHL) ++ STRCAT(dirbuf, dflt); + + gtk_file_selection_set_filename(GTK_FILE_SELECTION(gui.filedlg), + (const gchar *)dirbuf); +*** ../vim-7.0.128/src/version.c Tue Oct 10 17:36:50 2006 +--- src/version.c Tue Oct 10 18:25:11 2006 +*************** +*** 668,669 **** +--- 668,671 ---- + { /* Add new patch number below this line */ ++ /**/ ++ 129, + /**/ + +-- +I'm not familiar with this proof, but I'm aware of a significant +following of toddlers who believe that peanut butter is the solution +to all of life's problems... -- Tim Hammerquist + + /// Bram Moolenaar -- Bram@Moolenaar.net -- http://www.Moolenaar.net \\\ +/// sponsor Vim, vote for features -- http://www.Vim.org/sponsor/ \\\ +\\\ download, build and distribute -- http://www.A-A-P.org /// + \\\ help me help AIDS victims -- http://ICCF-Holland.org /// --- vim-7.0.orig/upstream/patches/7.0.064 +++ vim-7.0/upstream/patches/7.0.064 @@ -0,0 +1,66 @@ +To: vim-dev@vim.org +Subject: Patch 7.0.064 +Fcc: outbox +From: Bram Moolenaar +Mime-Version: 1.0 +Content-Type: text/plain; charset=ISO-8859-1 +Content-Transfer-Encoding: 8bit +------------ + +Patch 7.0.064 +Problem: Using uninitialized variable. (Tony Mechelynck) +Solution: When not used set "temp" to zero. Also avoid a warning for + "files" in ins_compl_dictionaries(). +Files: src/edit.c + + +*** ../vim-7.0.063/src/edit.c Wed Aug 16 21:26:19 2006 +--- src/edit.c Thu Aug 17 22:28:34 2006 +*************** +*** 2760,2765 **** +--- 2760,2766 ---- + } + else + # endif ++ if (count > 0) /* avoid warning for using "files" uninit */ + { + ins_compl_files(count, files, thesaurus, flags, + ®match, buf, &dir); +*************** +*** 3222,3228 **** + int c; + { + char_u *ptr; +- int temp; + int want_cindent; + int retval = FALSE; + +--- 3223,3228 ---- +*************** +*** 3378,3383 **** +--- 3378,3384 ---- + if (compl_curr_match != NULL || compl_leader != NULL || c == Ctrl_E) + { + char_u *p; ++ int temp = 0; + + /* + * If any of the original typed text has been changed, eg when +*** ../vim-7.0.063/src/version.c Wed Aug 16 22:03:35 2006 +--- src/version.c Tue Aug 22 19:56:05 2006 +*************** +*** 668,669 **** +--- 668,671 ---- + { /* Add new patch number below this line */ ++ /**/ ++ 64, + /**/ + +-- +hundred-and-one symptoms of being an internet addict: +200. You really believe in the concept of a "paperless" office. + + /// Bram Moolenaar -- Bram@Moolenaar.net -- http://www.Moolenaar.net \\\ +/// sponsor Vim, vote for features -- http://www.Vim.org/sponsor/ \\\ +\\\ download, build and distribute -- http://www.A-A-P.org /// + \\\ help me help AIDS victims -- http://ICCF-Holland.org /// --- vim-7.0.orig/upstream/patches/7.0.090 +++ vim-7.0/upstream/patches/7.0.090 @@ -0,0 +1,81 @@ +To: vim-dev@vim.org +Subject: Patch 7.0.090 +Fcc: outbox +From: Bram Moolenaar +Mime-Version: 1.0 +Content-Type: text/plain; charset=ISO-8859-1 +Content-Transfer-Encoding: 8bit +------------ + +Patch 7.0.090 +Problem: Cancelling the conform() dialog on the console with Esc requires + typing it twice. (Benji Fisher) +Solution: When the start of an escape sequence is found use 'timeoutlen' or + 'ttimeoutlen'. +Files: src/misc1.c + + +*** ../vim-7.0.089/src/misc1.c Sun Sep 3 16:39:51 2006 +--- src/misc1.c Tue Sep 5 20:31:43 2006 +*************** +*** 3016,3021 **** +--- 3016,3022 ---- + int len = 0; + int n; + int save_mapped_ctrl_c = mapped_ctrl_c; ++ int waited = 0; + + mapped_ctrl_c = FALSE; /* mappings are not used here */ + for (;;) +*************** +*** 3034,3044 **** + /* Replace zero and CSI by a special key code. */ + n = fix_input_buffer(buf + len, n, FALSE); + len += n; + } + +! /* incomplete termcode: get more characters */ +! if ((n = check_termcode(1, buf, len)) < 0) + continue; + /* found a termcode: adjust length */ + if (n > 0) + len = n; +--- 3035,3050 ---- + /* Replace zero and CSI by a special key code. */ + n = fix_input_buffer(buf + len, n, FALSE); + len += n; ++ waited = 0; + } ++ else if (len > 0) ++ ++waited; /* keep track of the waiting time */ + +! /* Incomplete termcode and not timed out yet: get more characters */ +! if ((n = check_termcode(1, buf, len)) < 0 +! && (!p_ttimeout || waited * 100L < (p_ttm < 0 ? p_tm : p_ttm))) + continue; ++ + /* found a termcode: adjust length */ + if (n > 0) + len = n; +*** ../vim-7.0.089/src/version.c Tue Sep 5 18:28:45 2006 +--- src/version.c Tue Sep 5 20:49:01 2006 +*************** +*** 668,669 **** +--- 668,671 ---- + { /* Add new patch number below this line */ ++ /**/ ++ 90, + /**/ + +-- +GUARD #1: Where'd you get the coconut? +ARTHUR: We found them. +GUARD #1: Found them? In Mercea? The coconut's tropical! +ARTHUR: What do you mean? +GUARD #1: Well, this is a temperate zone. + The Quest for the Holy Grail (Monty Python) + + /// Bram Moolenaar -- Bram@Moolenaar.net -- http://www.Moolenaar.net \\\ +/// sponsor Vim, vote for features -- http://www.Vim.org/sponsor/ \\\ +\\\ download, build and distribute -- http://www.A-A-P.org /// + \\\ help me help AIDS victims -- http://ICCF-Holland.org /// --- vim-7.0.orig/upstream/patches/7.0.006 +++ vim-7.0/upstream/patches/7.0.006 @@ -0,0 +1,46 @@ +To: vim-dev@vim.org +Subject: Patch 7.0.006 +Fcc: outbox +From: Bram Moolenaar +Mime-Version: 1.0 +Content-Type: text/plain; charset=ISO-8859-1 +Content-Transfer-Encoding: 8bit +------------ + +Patch 7.0.006 +Problem: Mac: "make shadow" doesn't make a link for infplist.xml. (Axel + Kielhorn) +Solution: Make the link. +Files: src/Makefile + + +*** ../vim-7.0.005/src/Makefile Wed May 10 15:22:49 2006 +--- src/Makefile Wed May 10 17:26:19 2006 +*************** +*** 2177,2182 **** +--- 2177,2183 ---- + cd $(SHADOWDIR)/xxd; ln -s ../../xxd/*.[ch] ../../xxd/Make* . + if test -d $(RSRC_DIR); then \ + cd $(SHADOWDIR); \ ++ ln -s ../infplist.xml .; \ + ln -s ../$(RSRC_DIR) ../os_mac.rsr.hqx ../dehqx.py .; \ + fi + mkdir $(SHADOWDIR)/testdir +*** ../vim-7.0.005/src/version.c Wed May 10 17:24:26 2006 +--- src/version.c Wed May 10 17:26:09 2006 +*************** +*** 668,669 **** +--- 668,671 ---- + { /* Add new patch number below this line */ ++ /**/ ++ 6, + /**/ + +-- +From "know your smileys": + @:-() Elvis Presley + + /// Bram Moolenaar -- Bram@Moolenaar.net -- http://www.Moolenaar.net \\\ +/// sponsor Vim, vote for features -- http://www.Vim.org/sponsor/ \\\ +\\\ download, build and distribute -- http://www.A-A-P.org /// + \\\ help me help AIDS victims -- http://ICCF-Holland.org /// --- vim-7.0.orig/upstream/patches/7.0.012 +++ vim-7.0/upstream/patches/7.0.012 @@ -0,0 +1,84 @@ +To: vim-dev@vim.org +Subject: Patch 7.0.012 +Fcc: outbox +From: Bram Moolenaar +Mime-Version: 1.0 +Content-Type: text/plain; charset=ISO-8859-1 +Content-Transfer-Encoding: 8bit +------------ + +Patch 7.0.012 +Problem: Using the matchparen plugin, moving the cursor in Insert mode to a + shorter line that ends in a brace, changes the preferred column +Solution: Use winsaveview()/winrestview() instead of getpos()/setpos(). +Files: runtime/plugin/matchparen.vim + + +*** ../vim-7.0.011/runtime/plugin/matchparen.vim Wed May 10 15:22:55 2006 +--- runtime/plugin/matchparen.vim Thu May 11 14:42:55 2006 +*************** +*** 1,6 **** + " Vim plugin for showing matching parens + " Maintainer: Bram Moolenaar +! " Last Change: 2006 Apr 27 + + " Exit quickly when: + " - this plugin was already loaded (or disabled) +--- 1,6 ---- + " Vim plugin for showing matching parens + " Maintainer: Bram Moolenaar +! " Last Change: 2006 May 11 + + " Exit quickly when: + " - this plugin was already loaded (or disabled) +*************** +*** 90,96 **** + " Find the match. When it was just before the cursor move it there for a + " moment. + if before > 0 +! let save_cursor = getpos('.') + call cursor(c_lnum, c_col - before) + endif + +--- 90,96 ---- + " Find the match. When it was just before the cursor move it there for a + " moment. + if before > 0 +! let save_cursor = winsaveview() + call cursor(c_lnum, c_col - before) + endif + +*************** +*** 102,108 **** + let [m_lnum, m_col] = searchpairpos(c, '', c2, s_flags, s_skip, stopline) + + if before > 0 +! call setpos('.', save_cursor) + endif + + " If a match is found setup match highlighting. +--- 102,108 ---- + let [m_lnum, m_col] = searchpairpos(c, '', c2, s_flags, s_skip, stopline) + + if before > 0 +! call winrestview(save_cursor) + endif + + " If a match is found setup match highlighting. +*** ../vim-7.0.011/src/version.c Thu May 11 19:24:16 2006 +--- src/version.c Thu May 11 19:29:58 2006 +*************** +*** 668,669 **** +--- 668,671 ---- + { /* Add new patch number below this line */ ++ /**/ ++ 12, + /**/ + +-- +Corduroy pillows: They're making headlines! + + /// Bram Moolenaar -- Bram@Moolenaar.net -- http://www.Moolenaar.net \\\ +/// sponsor Vim, vote for features -- http://www.Vim.org/sponsor/ \\\ +\\\ download, build and distribute -- http://www.A-A-P.org /// + \\\ help me help AIDS victims -- http://ICCF-Holland.org /// --- vim-7.0.orig/upstream/patches/7.0.147 +++ vim-7.0/upstream/patches/7.0.147 @@ -0,0 +1,297 @@ +To: vim-dev@vim.org +Subject: Patch 7.0.147 +Fcc: outbox +From: Bram Moolenaar +Mime-Version: 1.0 +Content-Type: text/plain; charset=ISO-8859-1 +Content-Transfer-Encoding: 8bit +------------ + +Patch 7.0.147 +Problem: When creating a session file and there are several tab pages and + some windows have a local directory a short file name may be used + when it's not valid. (Marius Roets) + A session with multiple tab pages may result in "No Name" buffers. + (Bill McCarthy) +Solution: Don't enter tab pages when going through the list, only use a + pointer to the first window in each tab page. + Use "tabedit" instead of "tabnew | edit" when possible. +Files: src/ex_docmd.c + + +*** ../vim-7.0.146/src/ex_docmd.c Sun Sep 10 21:05:39 2006 +--- src/ex_docmd.c Tue Oct 24 12:55:11 2006 +*************** +*** 9643,9649 **** + #endif + + #ifdef FEAT_SESSION +! static int ses_winsizes __ARGS((FILE *fd, int restore_size)); + static int ses_win_rec __ARGS((FILE *fd, frame_T *fr)); + static frame_T *ses_skipframe __ARGS((frame_T *fr)); + static int ses_do_frame __ARGS((frame_T *fr)); +--- 9643,9650 ---- + #endif + + #ifdef FEAT_SESSION +! static int ses_winsizes __ARGS((FILE *fd, int restore_size, +! win_T *tab_firstwin)); + static int ses_win_rec __ARGS((FILE *fd, frame_T *fr)); + static frame_T *ses_skipframe __ARGS((frame_T *fr)); + static int ses_do_frame __ARGS((frame_T *fr)); +*************** +*** 9669,9676 **** + win_T *wp; + char_u *sname; + win_T *edited_win = NULL; +- tabpage_T *old_curtab = curtab; + int tabnr; + + if (ssop_flags & SSOP_BUFFERS) + only_save_windows = FALSE; /* Save ALL buffers */ +--- 9670,9677 ---- + win_T *wp; + char_u *sname; + win_T *edited_win = NULL; + int tabnr; ++ win_T *tab_firstwin; + + if (ssop_flags & SSOP_BUFFERS) + only_save_windows = FALSE; /* Save ALL buffers */ +*************** +*** 9778,9791 **** + /* + * May repeat putting Windows for each tab, when "tabpages" is in + * 'sessionoptions'. + */ + for (tabnr = 1; ; ++tabnr) + { + if ((ssop_flags & SSOP_TABPAGES)) + { +! goto_tabpage(tabnr); +! if (tabnr > 1 && put_line(fd, "tabnew") == FAIL) +! return FAIL; + } + + /* +--- 9779,9804 ---- + /* + * May repeat putting Windows for each tab, when "tabpages" is in + * 'sessionoptions'. ++ * Don't use goto_tabpage(), it may change directory and trigger ++ * autocommands. + */ ++ tab_firstwin = firstwin; /* first window in tab page "tabnr" */ + for (tabnr = 1; ; ++tabnr) + { ++ int need_tabnew = FALSE; ++ + if ((ssop_flags & SSOP_TABPAGES)) + { +! tabpage_T *tp = find_tabpage(tabnr); +! +! if (tp == NULL) +! break; /* done all tab pages */ +! if (tp == curtab) +! tab_firstwin = firstwin; +! else +! tab_firstwin = tp->tp_firstwin; +! if (tabnr > 1) +! need_tabnew = TRUE; + } + + /* +*************** +*** 9793,9799 **** + * is aborted we don't end up with a number of useless windows. + * This may have side effects! (e.g., compressed or network file). + */ +! for (wp = firstwin; wp != NULL; wp = wp->w_next) + { + if (ses_do_win(wp) + && wp->w_buffer->b_ffname != NULL +--- 9806,9812 ---- + * is aborted we don't end up with a number of useless windows. + * This may have side effects! (e.g., compressed or network file). + */ +! for (wp = tab_firstwin; wp != NULL; wp = wp->w_next) + { + if (ses_do_win(wp) + && wp->w_buffer->b_ffname != NULL +*************** +*** 9803,9817 **** + #endif + ) + { +! if (fputs("edit ", fd) < 0 + || ses_fname(fd, wp->w_buffer, &ssop_flags) == FAIL) + return FAIL; + if (!wp->w_arg_idx_invalid) + edited_win = wp; + break; + } + } + + /* + * Save current window layout. + */ +--- 9816,9835 ---- + #endif + ) + { +! if (fputs(need_tabnew ? "tabedit " : "edit ", fd) < 0 + || ses_fname(fd, wp->w_buffer, &ssop_flags) == FAIL) + return FAIL; ++ need_tabnew = FALSE; + if (!wp->w_arg_idx_invalid) + edited_win = wp; + break; + } + } + ++ /* If no file got edited create an empty tab page. */ ++ if (need_tabnew && put_line(fd, "tabnew") == FAIL) ++ return FAIL; ++ + /* + * Save current window layout. + */ +*************** +*** 9829,9835 **** + * Remember the window number of the current window after restoring. + */ + nr = 0; +! for (wp = firstwin; wp != NULL; wp = W_NEXT(wp)) + { + if (ses_do_win(wp)) + ++nr; +--- 9847,9853 ---- + * Remember the window number of the current window after restoring. + */ + nr = 0; +! for (wp = tab_firstwin; wp != NULL; wp = W_NEXT(wp)) + { + if (ses_do_win(wp)) + ++nr; +*************** +*** 9852,9864 **** + */ + if (put_line(fd, "set winheight=1 winwidth=1") == FAIL) + return FAIL; +! if (nr > 1 && ses_winsizes(fd, restore_size) == FAIL) + return FAIL; + + /* + * Restore the view of the window (options, file, cursor, etc.). + */ +! for (wp = firstwin; wp != NULL; wp = wp->w_next) + { + if (!ses_do_win(wp)) + continue; +--- 9870,9882 ---- + */ + if (put_line(fd, "set winheight=1 winwidth=1") == FAIL) + return FAIL; +! if (nr > 1 && ses_winsizes(fd, restore_size, tab_firstwin) == FAIL) + return FAIL; + + /* + * Restore the view of the window (options, file, cursor, etc.). + */ +! for (wp = tab_firstwin; wp != NULL; wp = wp->w_next) + { + if (!ses_do_win(wp)) + continue; +*************** +*** 9879,9897 **** + * Restore window sizes again after jumping around in windows, because + * the current window has a minimum size while others may not. + */ +! if (nr > 1 && ses_winsizes(fd, restore_size) == FAIL) + return FAIL; + + /* Don't continue in another tab page when doing only the current one + * or when at the last tab page. */ +! if (!(ssop_flags & SSOP_TABPAGES) || curtab->tp_next == NULL) + break; + } + + if (ssop_flags & SSOP_TABPAGES) + { +- if (valid_tabpage(old_curtab)) +- goto_tabpage_tp(old_curtab); + if (fprintf(fd, "tabnext %d", tabpage_index(curtab)) < 0 + || put_eol(fd) == FAIL) + return FAIL; +--- 9897,9913 ---- + * Restore window sizes again after jumping around in windows, because + * the current window has a minimum size while others may not. + */ +! if (nr > 1 && ses_winsizes(fd, restore_size, tab_firstwin) == FAIL) + return FAIL; + + /* Don't continue in another tab page when doing only the current one + * or when at the last tab page. */ +! if (!(ssop_flags & SSOP_TABPAGES)) + break; + } + + if (ssop_flags & SSOP_TABPAGES) + { + if (fprintf(fd, "tabnext %d", tabpage_index(curtab)) < 0 + || put_eol(fd) == FAIL) + return FAIL; +*************** +*** 9927,9942 **** + } + + static int +! ses_winsizes(fd, restore_size) + FILE *fd; + int restore_size; + { + int n = 0; + win_T *wp; + + if (restore_size && (ssop_flags & SSOP_WINSIZE)) + { +! for (wp = firstwin; wp != NULL; wp = wp->w_next) + { + if (!ses_do_win(wp)) + continue; +--- 9943,9959 ---- + } + + static int +! ses_winsizes(fd, restore_size, tab_firstwin) + FILE *fd; + int restore_size; ++ win_T *tab_firstwin; + { + int n = 0; + win_T *wp; + + if (restore_size && (ssop_flags & SSOP_WINSIZE)) + { +! for (wp = tab_firstwin; wp != NULL; wp = wp->w_next) + { + if (!ses_do_win(wp)) + continue; +*** ../vim-7.0.146/src/version.c Fri Oct 20 20:15:05 2006 +--- src/version.c Tue Oct 24 12:57:04 2006 +*************** +*** 668,669 **** +--- 668,671 ---- + { /* Add new patch number below this line */ ++ /**/ ++ 147, + /**/ + +-- +hundred-and-one symptoms of being an internet addict: +95. Only communication in your household is through email. + + /// Bram Moolenaar -- Bram@Moolenaar.net -- http://www.Moolenaar.net \\\ +/// sponsor Vim, vote for features -- http://www.Vim.org/sponsor/ \\\ +\\\ download, build and distribute -- http://www.A-A-P.org /// + \\\ help me help AIDS victims -- http://ICCF-Holland.org /// --- vim-7.0.orig/upstream/patches/7.0.021 +++ vim-7.0/upstream/patches/7.0.021 @@ -0,0 +1,139 @@ +To: vim-dev@vim.org +Subject: Patch 7.0.021 +Fcc: outbox +From: Bram Moolenaar +Mime-Version: 1.0 +Content-Type: text/plain; charset=ISO-8859-1 +Content-Transfer-Encoding: 8bit +------------ + +Patch 7.0.021 +Problem: Crash when using "\\[" and "\\]" in 'errorformat'. (Marc Weber) +Solution: Check for valid submatches after matching the pattern. +Files: src/quickfix.c + + +*** ../vim-7.0.020/src/quickfix.c Wed May 3 23:23:30 2006 +--- src/quickfix.c Tue Jun 20 17:04:20 2006 +*************** +*** 602,614 **** + else + type = 0; + /* +! * Extract error message data from matched line + */ + if ((i = (int)fmt_ptr->addr[0]) > 0) /* %f */ + { +! int c = *regmatch.endp[i]; + + /* Expand ~/file and $HOME/file to full path. */ + *regmatch.endp[i] = NUL; + expand_env(regmatch.startp[i], namebuf, CMDBUFFSIZE); + *regmatch.endp[i] = c; +--- 602,620 ---- + else + type = 0; + /* +! * Extract error message data from matched line. +! * We check for an actual submatch, because "\[" and "\]" in +! * the 'errorformat' may cause the wrong submatch to be used. + */ + if ((i = (int)fmt_ptr->addr[0]) > 0) /* %f */ + { +! int c; +! +! if (regmatch.startp[i] == NULL || regmatch.endp[i] == NULL) +! continue; + + /* Expand ~/file and $HOME/file to full path. */ ++ c = *regmatch.endp[i]; + *regmatch.endp[i] = NUL; + expand_env(regmatch.startp[i], namebuf, CMDBUFFSIZE); + *regmatch.endp[i] = c; +*************** +*** 618,652 **** +--- 624,686 ---- + continue; + } + if ((i = (int)fmt_ptr->addr[1]) > 0) /* %n */ ++ { ++ if (regmatch.startp[i] == NULL) ++ continue; + enr = (int)atol((char *)regmatch.startp[i]); ++ } + if ((i = (int)fmt_ptr->addr[2]) > 0) /* %l */ ++ { ++ if (regmatch.startp[i] == NULL) ++ continue; + lnum = atol((char *)regmatch.startp[i]); ++ } + if ((i = (int)fmt_ptr->addr[3]) > 0) /* %c */ ++ { ++ if (regmatch.startp[i] == NULL) ++ continue; + col = (int)atol((char *)regmatch.startp[i]); ++ } + if ((i = (int)fmt_ptr->addr[4]) > 0) /* %t */ ++ { ++ if (regmatch.startp[i] == NULL) ++ continue; + type = *regmatch.startp[i]; ++ } + if (fmt_ptr->flags == '+' && !multiscan) /* %+ */ + STRCPY(errmsg, IObuff); + else if ((i = (int)fmt_ptr->addr[5]) > 0) /* %m */ + { ++ if (regmatch.startp[i] == NULL || regmatch.endp[i] == NULL) ++ continue; + len = (int)(regmatch.endp[i] - regmatch.startp[i]); + vim_strncpy(errmsg, regmatch.startp[i], len); + } + if ((i = (int)fmt_ptr->addr[6]) > 0) /* %r */ ++ { ++ if (regmatch.startp[i] == NULL) ++ continue; + tail = regmatch.startp[i]; ++ } + if ((i = (int)fmt_ptr->addr[7]) > 0) /* %p */ + { ++ if (regmatch.startp[i] == NULL || regmatch.endp[i] == NULL) ++ continue; + col = (int)(regmatch.endp[i] - regmatch.startp[i] + 1); + if (*((char_u *)regmatch.startp[i]) != TAB) + use_viscol = TRUE; + } + if ((i = (int)fmt_ptr->addr[8]) > 0) /* %v */ + { ++ if (regmatch.startp[i] == NULL) ++ continue; + col = (int)atol((char *)regmatch.startp[i]); + use_viscol = TRUE; + } + if ((i = (int)fmt_ptr->addr[9]) > 0) /* %s */ + { ++ if (regmatch.startp[i] == NULL || regmatch.endp[i] == NULL) ++ continue; + len = (int)(regmatch.endp[i] - regmatch.startp[i]); + if (len > CMDBUFFSIZE - 5) + len = CMDBUFFSIZE - 5; +*** ../vim-7.0.020/src/version.c Tue Jun 20 16:33:21 2006 +--- src/version.c Tue Jun 20 17:07:25 2006 +*************** +*** 668,669 **** +--- 668,671 ---- + { /* Add new patch number below this line */ ++ /**/ ++ 21, + /**/ + +-- +TALL KNIGHT: We are now no longer the Knights Who Say Ni! +ONE KNIGHT: Ni! +OTHERS: Sh! +ONE KNIGHT: (whispers) Sorry. + "Monty Python and the Holy Grail" PYTHON (MONTY) PICTURES LTD + + /// Bram Moolenaar -- Bram@Moolenaar.net -- http://www.Moolenaar.net \\\ +/// sponsor Vim, vote for features -- http://www.Vim.org/sponsor/ \\\ +\\\ download, build and distribute -- http://www.A-A-P.org /// + \\\ help me help AIDS victims -- http://ICCF-Holland.org /// --- vim-7.0.orig/upstream/patches/7.0.002 +++ vim-7.0/upstream/patches/7.0.002 @@ -0,0 +1,70 @@ +To: vim-dev@vim.org +Subject: Patch 7.0.002 +Fcc: outbox +From: Bram Moolenaar +Mime-Version: 1.0 +Content-Type: text/plain; charset=ISO-8859-1 +Content-Transfer-Encoding: 8bit +------------ + +Patch 7.0.002 +Problem: C omni completion has a problem with tags files with a path + containing "#" or "%". +Solution: Escape these characters. (Sebastian Baberowski) +Files: runtime/autoload/ccomplete.vim + + +*** ../vim-7.0.001/runtime/autoload/ccomplete.vim Wed May 10 15:22:54 2006 +--- runtime/autoload/ccomplete.vim Mon May 8 13:52:07 2006 +*************** +*** 1,7 **** + " Vim completion script + " Language: C + " Maintainer: Bram Moolenaar +! " Last Change: 2006 May 03 + + + " This function is used for the 'omnifunc' option. +--- 1,7 ---- + " Vim completion script + " Language: C + " Maintainer: Bram Moolenaar +! " Last Change: 2006 May 08 + + + " This function is used for the 'omnifunc' option. +*************** +*** 458,464 **** + " member. + function! s:StructMembers(typename, items, all) + " Todo: What about local structures? +! let fnames = join(map(tagfiles(), 'escape(v:val, " \\")')) + if fnames == '' + return [] + endif +--- 458,464 ---- + " member. + function! s:StructMembers(typename, items, all) + " Todo: What about local structures? +! let fnames = join(map(tagfiles(), 'escape(v:val, " \\#%")')) + if fnames == '' + return [] + endif +*** ../vim-7.0.001/src/version.c Wed May 10 15:22:50 2006 +--- src/version.c Wed May 10 15:24:42 2006 +*************** +*** 668,669 **** +--- 668,671 ---- + { /* Add new patch number below this line */ ++ /**/ ++ 2, + /**/ + +-- +From "know your smileys": + =):-) Uncle Sam + + /// Bram Moolenaar -- Bram@Moolenaar.net -- http://www.Moolenaar.net \\\ +/// sponsor Vim, vote for features -- http://www.Vim.org/sponsor/ \\\ +\\\ download, build and distribute -- http://www.A-A-P.org /// + \\\ help me help AIDS victims -- http://ICCF-Holland.org /// --- vim-7.0.orig/upstream/patches/7.0.158 +++ vim-7.0/upstream/patches/7.0.158 @@ -0,0 +1,50 @@ +To: vim-dev@vim.org +Subject: Patch 7.0.158 +Fcc: outbox +From: Bram Moolenaar +Mime-Version: 1.0 +Content-Type: text/plain; charset=ISO-8859-1 +Content-Transfer-Encoding: 8bit +------------ + +Patch 7.0.158 +Problem: In a C file with ":set foldmethod=syntax", typing { on the + last line results in the cursor being in a closed fold. (Gautam + Iyer) +Solution: Open fold after inserting a new line. +Files: src/edit.c + + +*** ../vim-7.0.157/src/edit.c Tue Oct 17 13:39:36 2006 +--- src/edit.c Wed Nov 1 21:17:19 2006 +*************** +*** 9204,9209 **** +--- 9204,9213 ---- + #ifdef FEAT_CINDENT + can_cindent = TRUE; + #endif ++ #ifdef FEAT_FOLDING ++ /* When inserting a line the cursor line must never be in a closed fold. */ ++ foldOpenCursor(); ++ #endif + + return (!i); + } +*** ../vim-7.0.157/src/version.c Wed Nov 1 18:33:43 2006 +--- src/version.c Wed Nov 1 21:21:22 2006 +*************** +*** 668,669 **** +--- 668,671 ---- + { /* Add new patch number below this line */ ++ /**/ ++ 158, + /**/ + +-- +hundred-and-one symptoms of being an internet addict: +142. You dream about creating the world's greatest web site. + + /// Bram Moolenaar -- Bram@Moolenaar.net -- http://www.Moolenaar.net \\\ +/// sponsor Vim, vote for features -- http://www.Vim.org/sponsor/ \\\ +\\\ download, build and distribute -- http://www.A-A-P.org /// + \\\ help me help AIDS victims -- http://ICCF-Holland.org /// --- vim-7.0.orig/upstream/patches/7.0.148 +++ vim-7.0/upstream/patches/7.0.148 @@ -0,0 +1,58 @@ +To: vim-dev@vim.org +Subject: Patch 7.0.148 +Fcc: outbox +From: Bram Moolenaar +Mime-Version: 1.0 +Content-Type: text/plain; charset=ISO-8859-1 +Content-Transfer-Encoding: 8bit +------------ + +Patch 7.0.148 +Problem: When doing "call a.xyz()" and "xyz" does not exist in dictionary + "a" there is no error message. (Yegappan Lakshmanan) +Solution: Add the error message. +Files: src/eval.c + + +*** ../vim-7.0.147/src/eval.c Tue Oct 17 15:17:41 2006 +--- src/eval.c Tue Oct 24 11:01:25 2006 +*************** +*** 3125,3131 **** + funcdict_T fudi; + + tofree = trans_function_name(&arg, eap->skip, TFN_INT, &fudi); +! vim_free(fudi.fd_newkey); + if (tofree == NULL) + return; + +--- 3125,3136 ---- + funcdict_T fudi; + + tofree = trans_function_name(&arg, eap->skip, TFN_INT, &fudi); +! if (fudi.fd_newkey != NULL) +! { +! /* Still need to give an error message for missing key. */ +! EMSG2(_(e_dictkey), fudi.fd_newkey); +! vim_free(fudi.fd_newkey); +! } + if (tofree == NULL) + return; + +*** ../vim-7.0.147/src/version.c Tue Oct 24 13:02:27 2006 +--- src/version.c Tue Oct 24 13:50:39 2006 +*************** +*** 668,669 **** +--- 668,671 ---- + { /* Add new patch number below this line */ ++ /**/ ++ 148, + /**/ + +-- +hundred-and-one symptoms of being an internet addict: +99. The hum of a cooling fan and the click of keys is comforting to you. + + /// Bram Moolenaar -- Bram@Moolenaar.net -- http://www.Moolenaar.net \\\ +/// sponsor Vim, vote for features -- http://www.Vim.org/sponsor/ \\\ +\\\ download, build and distribute -- http://www.A-A-P.org /// + \\\ help me help AIDS victims -- http://ICCF-Holland.org /// --- vim-7.0.orig/upstream/patches/7.0.107 +++ vim-7.0/upstream/patches/7.0.107 @@ -0,0 +1,58 @@ +To: vim-dev@vim.org +Subject: Patch 7.0.107 +Fcc: outbox +From: Bram Moolenaar +Mime-Version: 1.0 +Content-Type: text/plain; charset=ISO-8859-1 +Content-Transfer-Encoding: 8bit +------------ + +Patch 7.0.107 +Problem: Incremental search doesn't redraw the text tabline. (Ilya Bobir) + Also happens in other situations with one window in a tab page. +Solution: Redraw the tabline after clearing the screen. +Files: src/screen.c + + +*** ../vim-7.0.106/src/screen.c Tue Aug 29 17:28:56 2006 +--- src/screen.c Thu Sep 14 21:00:32 2006 +*************** +*** 1228,1234 **** +--- 1228,1241 ---- + { + mid_end = wp->w_height; + if (lastwin == firstwin) ++ { + screenclear(); ++ #ifdef FEAT_WINDOWS ++ /* The screen was cleared, redraw the tab pages line. */ ++ if (redraw_tabline) ++ draw_tabline(); ++ #endif ++ } + } + } + else +*** ../vim-7.0.106/src/version.c Thu Sep 14 13:35:17 2006 +--- src/version.c Thu Sep 14 21:03:40 2006 +*************** +*** 668,669 **** +--- 668,671 ---- + { /* Add new patch number below this line */ ++ /**/ ++ 107, + /**/ + +-- +VOICE OVER: As the horrendous Black Beast lunged forward, escape for Arthur + and his knights seemed hopeless, when, suddenly ... the animator + suffered a fatal heart attack. +ANIMATOR: Aaaaagh! +VOICE OVER: The cartoon peril was no more ... The Quest for Holy Grail could + continue. + "Monty Python and the Holy Grail" PYTHON (MONTY) PICTURES LTD + + /// Bram Moolenaar -- Bram@Moolenaar.net -- http://www.Moolenaar.net \\\ +/// sponsor Vim, vote for features -- http://www.Vim.org/sponsor/ \\\ +\\\ download, build and distribute -- http://www.A-A-P.org /// + \\\ help me help AIDS victims -- http://ICCF-Holland.org /// --- vim-7.0.orig/upstream/patches/7.0.083 +++ vim-7.0/upstream/patches/7.0.083 @@ -0,0 +1,91 @@ +To: vim-dev@vim.org +Subject: Patch 7.0.083 +Fcc: outbox +From: Bram Moolenaar +Mime-Version: 1.0 +Content-Type: text/plain; charset=ISO-8859-1 +Content-Transfer-Encoding: 8bit +------------ + +Patch 7.0.083 +Problem: Clicking with the mouse on an item for inputlist() doesn't work + when 'compatible' is set and/or when 'cmdheight' is more than one. + (Christian J. Robinson) +Solution: Also decrement "lines_left" when 'more' isn't set. Set + "cmdline_row" to zero to get all mouse events. +Files: src/message.c, src/misc1.c + + +*** ../vim-7.0.082/src/message.c Sat May 13 13:12:49 2006 +--- src/message.c Sun Sep 3 14:32:00 2006 +*************** +*** 1925,1931 **** + * If screen is completely filled and 'more' is set then wait + * for a character. + */ +! if (p_more && --lines_left == 0 && State != HITRETURN + && !msg_no_more && !exmode_active) + { + #ifdef FEAT_CON_DIALOG +--- 1925,1932 ---- + * If screen is completely filled and 'more' is set then wait + * for a character. + */ +! --lines_left; +! if (p_more && lines_left == 0 && State != HITRETURN + && !msg_no_more && !exmode_active) + { + #ifdef FEAT_CON_DIALOG +*** ../vim-7.0.082/src/misc1.c Tue Aug 15 22:26:04 2006 +--- src/misc1.c Sun Sep 3 16:33:48 2006 +*************** +*** 3196,3209 **** + else + MSG_PUTS(_("Choice number ( cancels): ")); + +! /* Set the state such that text can be selected/copied/pasted. */ + save_cmdline_row = cmdline_row; +! cmdline_row = Rows - 1; + save_State = State; +! if (mouse_used == NULL) +! State = CMDLINE; +! else +! State = NORMAL; + + i = get_number(TRUE, mouse_used); + if (KeyTyped) +--- 3196,3207 ---- + else + MSG_PUTS(_("Choice number ( cancels): ")); + +! /* Set the state such that text can be selected/copied/pasted and we still +! * get mouse events. */ + save_cmdline_row = cmdline_row; +! cmdline_row = 0; + save_State = State; +! State = CMDLINE; + + i = get_number(TRUE, mouse_used); + if (KeyTyped) +*** ../vim-7.0.082/src/version.c Sun Sep 3 15:38:02 2006 +--- src/version.c Sun Sep 3 16:36:58 2006 +*************** +*** 668,669 **** +--- 668,671 ---- + { /* Add new patch number below this line */ ++ /**/ ++ 83, + /**/ + +-- + "To whoever finds this note - + I have been imprisoned by my father who wishes me to marry + against my will. Please please please please come and rescue me. + I am in the tall tower of Swamp Castle." + SIR LAUNCELOT's eyes light up with holy inspiration. + "Monty Python and the Holy Grail" PYTHON (MONTY) PICTURES LTD + + /// Bram Moolenaar -- Bram@Moolenaar.net -- http://www.Moolenaar.net \\\ +/// sponsor Vim, vote for features -- http://www.Vim.org/sponsor/ \\\ +\\\ download, build and distribute -- http://www.A-A-P.org /// + \\\ help me help AIDS victims -- http://ICCF-Holland.org /// --- vim-7.0.orig/upstream/patches/7.0.088 +++ vim-7.0/upstream/patches/7.0.088 @@ -0,0 +1,84 @@ +To: vim-dev@vim.org +Subject: Patch 7.0.088 +Fcc: outbox +From: Bram Moolenaar +Mime-Version: 1.0 +Content-Type: text/plain; charset=ISO-8859-1 +Content-Transfer-Encoding: 8bit +------------ + +Patch 7.0.088 +Problem: When compiled with Perl the generated prototypes have "extern" + unnecessarily added. +Solution: Remove the "-pipe" argument from PERL_CFLAGS. +Files: src/auto/configure, src/configure.in + + +*** ../vim-7.0.087/src/auto/configure Thu May 4 23:52:03 2006 +--- src/auto/configure Tue Sep 5 17:09:55 2006 +*************** +*** 4014,4020 **** + LDFLAGS=$ldflags_save + if test $perl_ok = yes; then + if test "X$perlcppflags" != "X"; then +! PERL_CFLAGS="$perlcppflags" + fi + if test "X$perlldflags" != "X"; then + LDFLAGS="$perlldflags $LDFLAGS" +--- 4014,4020 ---- + LDFLAGS=$ldflags_save + if test $perl_ok = yes; then + if test "X$perlcppflags" != "X"; then +! PERL_CFLAGS=`echo "$perlcppflags" | sed 's/-pipe //'` + fi + if test "X$perlldflags" != "X"; then + LDFLAGS="$perlldflags $LDFLAGS" +*** ../vim-7.0.087/src/configure.in Thu May 4 23:52:32 2006 +--- src/configure.in Tue Sep 5 17:09:50 2006 +*************** +*** 508,514 **** + LDFLAGS=$ldflags_save + if test $perl_ok = yes; then + if test "X$perlcppflags" != "X"; then +! PERL_CFLAGS="$perlcppflags" + fi + if test "X$perlldflags" != "X"; then + LDFLAGS="$perlldflags $LDFLAGS" +--- 508,515 ---- + LDFLAGS=$ldflags_save + if test $perl_ok = yes; then + if test "X$perlcppflags" != "X"; then +! dnl remove -pipe, it confuses cproto +! PERL_CFLAGS=`echo "$perlcppflags" | sed 's/-pipe //'` + fi + if test "X$perlldflags" != "X"; then + LDFLAGS="$perlldflags $LDFLAGS" +*** ../vim-7.0.087/src/version.c Tue Sep 5 16:29:38 2006 +--- src/version.c Tue Sep 5 17:27:33 2006 +*************** +*** 668,669 **** +--- 668,671 ---- + { /* Add new patch number below this line */ ++ /**/ ++ 88, + /**/ + +-- + ** Hello and Welcome to the Psychiatric Hotline ** +If you are obsessive-compulsive, please press 1 repeatedly. +If you are co-dependent, please ask someone to press 2. +If you have multiple personalities, please press 3, 4, 5 and 6. +If you are paranoid-delusional, we know who you are and what you want + - just stay on the line so we can trace the call. +If you are schizophrenic, listen carefully and a little voice will + tell you which number to press next. +If you are manic-depressive, it doesn't matter which number you press + - no one will answer. +If you suffer from panic attacks, push every button you can find. +If you are sane, please hold on - we have the rest of humanity on the + other line and they desparately want to ask you a few questions. + + /// Bram Moolenaar -- Bram@Moolenaar.net -- http://www.Moolenaar.net \\\ +/// sponsor Vim, vote for features -- http://www.Vim.org/sponsor/ \\\ +\\\ download, build and distribute -- http://www.A-A-P.org /// + \\\ help me help AIDS victims -- http://ICCF-Holland.org /// --- vim-7.0.orig/upstream/patches/7.0.131 +++ vim-7.0/upstream/patches/7.0.131 @@ -0,0 +1,77 @@ +To: vim-dev@vim.org +Subject: Patch 7.0.131 +Fcc: outbox +From: Bram Moolenaar +Mime-Version: 1.0 +Content-Type: text/plain; charset=ISO-8859-1 +Content-Transfer-Encoding: 8bit +------------ + +Patch 7.0.131 +Problem: Win32: "vim -r" does not list all the swap files. +Solution: Also check for swap files starting with a dot. +Files: src/memline.c + + +*** ../vim-7.0.130/src/memline.c Tue Oct 10 16:20:51 2006 +--- src/memline.c Tue Oct 10 21:54:21 2006 +*************** +*** 1400,1407 **** + names[0] = vim_strsave((char_u *)"*.sw?"); + # endif + #endif +! #ifdef UNIX +! /* for Unix names starting with a dot are special */ + names[1] = vim_strsave((char_u *)".*.sw?"); + names[2] = vim_strsave((char_u *)".sw?"); + num_names = 3; +--- 1400,1408 ---- + names[0] = vim_strsave((char_u *)"*.sw?"); + # endif + #endif +! #if defined(UNIX) || defined(WIN3264) +! /* For Unix names starting with a dot are special. MS-Windows +! * supports this too, on some file systems. */ + names[1] = vim_strsave((char_u *)".*.sw?"); + names[2] = vim_strsave((char_u *)".sw?"); + num_names = 3; +*************** +*** 1430,1437 **** + names[0] = concat_fnames(dir_name, (char_u *)"*.sw?", TRUE); + # endif + #endif +! #ifdef UNIX +! /* for Unix names starting with a dot are special */ + names[1] = concat_fnames(dir_name, (char_u *)".*.sw?", TRUE); + names[2] = concat_fnames(dir_name, (char_u *)".sw?", TRUE); + num_names = 3; +--- 1431,1439 ---- + names[0] = concat_fnames(dir_name, (char_u *)"*.sw?", TRUE); + # endif + #endif +! #if defined(UNIX) || defined(WIN3264) +! /* For Unix names starting with a dot are special. MS-Windows +! * supports this too, on some file systems. */ + names[1] = concat_fnames(dir_name, (char_u *)".*.sw?", TRUE); + names[2] = concat_fnames(dir_name, (char_u *)".sw?", TRUE); + num_names = 3; +*** ../vim-7.0.130/src/version.c Tue Oct 10 18:43:50 2006 +--- src/version.c Tue Oct 10 21:55:02 2006 +*************** +*** 668,669 **** +--- 668,671 ---- + { /* Add new patch number below this line */ ++ /**/ ++ 131, + /**/ + +-- +Apparently, 1 in 5 people in the world are Chinese. And there are 5 +people in my family, so it must be one of them. It's either my mum +or my dad. Or my older brother Colin. Or my younger brother +Ho-Cha-Chu. But I think it's Colin. + + /// Bram Moolenaar -- Bram@Moolenaar.net -- http://www.Moolenaar.net \\\ +/// sponsor Vim, vote for features -- http://www.Vim.org/sponsor/ \\\ +\\\ download, build and distribute -- http://www.A-A-P.org /// + \\\ help me help AIDS victims -- http://ICCF-Holland.org /// --- vim-7.0.orig/upstream/patches/7.0.027 +++ vim-7.0/upstream/patches/7.0.027 @@ -0,0 +1,48 @@ +To: vim-dev@vim.org +Subject: Patch 7.0.027 (extra) +Fcc: outbox +From: Bram Moolenaar +Mime-Version: 1.0 +Content-Type: text/plain; charset=ISO-8859-1 +Content-Transfer-Encoding: 8bit +------------ + +Patch 7.0.027 (extra) +Problem: Win32: When compiled with SNIFF gvim may hang on exit. +Solution: Translate and dispatch the WM_USER message. (Mathias Michaelis) +Files: src/gui_w48.c + + +*** ../vim-7.0.026/src/gui_w48.c Thu Apr 27 01:52:16 2006 +--- src/gui_w48.c Sat Jun 17 13:23:26 2006 +*************** +*** 1664,1670 **** +--- 1664,1674 ---- + /* request is handled in normal.c */ + } + if (msg.message == WM_USER) ++ { ++ MyTranslateMessage(&msg) ++ DispatchMessage(&msg); + return; ++ } + #endif + + #ifdef MSWIN_FIND_REPLACE +*** ../vim-7.0.026/src/version.c Thu Jun 22 18:06:48 2006 +--- src/version.c Thu Jun 22 18:20:40 2006 +*************** +*** 668,669 **** +--- 668,671 ---- + { /* Add new patch number below this line */ ++ /**/ ++ 27, + /**/ + +-- +SIGFUN -- signature too funny (core dumped) + + /// Bram Moolenaar -- Bram@Moolenaar.net -- http://www.Moolenaar.net \\\ +/// sponsor Vim, vote for features -- http://www.Vim.org/sponsor/ \\\ +\\\ download, build and distribute -- http://www.A-A-P.org /// + \\\ help me help AIDS victims -- http://ICCF-Holland.org /// --- vim-7.0.orig/upstream/patches/7.0.055 +++ vim-7.0/upstream/patches/7.0.055 @@ -0,0 +1,71 @@ +To: vim-dev@vim.org +Subject: Patch 7.0.055 +Fcc: outbox +From: Bram Moolenaar +Mime-Version: 1.0 +Content-Type: text/plain; charset=ISO-8859-1 +Content-Transfer-Encoding: 8bit +------------ + +Patch 7.0.055 +Problem: ":startinsert" in a CmdwinEnter autocommand doesn't take immediate + effect. (Bradley White) +Solution: Put a NOP key in the typeahead buffer. Also avoid that using + CTRL-C to go back to the command line moves the cursor left. +Files: src/edit.c, src/ex_getln.c + + +*** ../vim-7.0.054/src/edit.c Fri Jun 23 21:36:49 2006 +--- src/edit.c Wed Aug 16 16:17:29 2006 +*************** +*** 882,887 **** +--- 882,888 ---- + /* Close the cmdline window. */ + cmdwin_result = K_IGNORE; + got_int = FALSE; /* don't stop executing autocommands et al. */ ++ nomove = TRUE; + goto doESCkey; + } + #endif +*************** +*** 2414,2419 **** +--- 2415,2421 ---- + compl_matches = ins_compl_make_cyclic(); + compl_started = TRUE; + compl_used_match = TRUE; ++ compl_cont_status = 0; + + compl_curr_match = compl_first_match; + ins_complete(Ctrl_N); +*** ../vim-7.0.054/src/ex_getln.c Sun Apr 30 20:43:17 2006 +--- src/ex_getln.c Wed Aug 16 16:07:04 2006 +*************** +*** 5982,5987 **** +--- 5982,5989 ---- + typestr[0] = cmdwin_type; + typestr[1] = NUL; + apply_autocmds(EVENT_CMDWINENTER, typestr, typestr, FALSE, curbuf); ++ if (restart_edit != 0) /* autocmd with ":startinsert" */ ++ stuffcharReadbuff(K_NOP); + # endif + + i = RedrawingDisabled; +*** ../vim-7.0.054/src/version.c Wed Aug 16 15:56:58 2006 +--- src/version.c Wed Aug 16 16:21:45 2006 +*************** +*** 668,669 **** +--- 668,671 ---- + { /* Add new patch number below this line */ ++ /**/ ++ 55, + /**/ + +-- +hundred-and-one symptoms of being an internet addict: +157. You fum through a magazine, you first check to see if it has a web + address. + + /// Bram Moolenaar -- Bram@Moolenaar.net -- http://www.Moolenaar.net \\\ +/// sponsor Vim, vote for features -- http://www.Vim.org/sponsor/ \\\ +\\\ download, build and distribute -- http://www.A-A-P.org /// + \\\ help me help AIDS victims -- http://ICCF-Holland.org /// --- vim-7.0.orig/upstream/patches/7.0.008 +++ vim-7.0/upstream/patches/7.0.008 @@ -0,0 +1,74 @@ +To: vim-dev@vim.org +Subject: Patch 7.0.008 +Fcc: outbox +From: Bram Moolenaar +Mime-Version: 1.0 +Content-Type: text/plain; charset=ISO-8859-1 +Content-Transfer-Encoding: 8bit +------------ + +Patch 7.0.008 +Problem: Can't call a function that uses both and {expr}. (Thomas) +Solution: Check both the expanded and unexpanded name for . +Files: src/eval.c + + +*** ../vim-7.0.007/src/eval.c Wed May 10 15:22:49 2006 +--- src/eval.c Wed May 10 12:11:42 2006 +*************** +*** 11372,11378 **** + if (argvars[2].v_type != VAR_UNKNOWN) + { + char_u *xp_name; +! int xp_namelen; + long argt; + + rettv->vval.v_string = NULL; +--- 11372,11378 ---- + if (argvars[2].v_type != VAR_UNKNOWN) + { + char_u *xp_name; +! int xp_namelen; + long argt; + + rettv->vval.v_string = NULL; +*************** +*** 18963,18969 **** + else if (lead > 0) + { + lead = 3; +! if (eval_fname_sid(lv.ll_exp_name != NULL ? lv.ll_exp_name : *pp)) + { + /* It's "s:" or "" */ + if (current_SID <= 0) +--- 18963,18970 ---- + else if (lead > 0) + { + lead = 3; +! if ((lv.ll_exp_name != NULL && eval_fname_sid(lv.ll_exp_name)) +! || eval_fname_sid(*pp)) + { + /* It's "s:" or "" */ + if (current_SID <= 0) +*** ../vim-7.0.007/src/version.c Wed May 10 17:38:05 2006 +--- src/version.c Wed May 10 17:39:46 2006 +*************** +*** 668,669 **** +--- 668,671 ---- + { /* Add new patch number below this line */ ++ /**/ ++ 8, + /**/ + +-- +From "know your smileys": + % Bike accident. A bit far-fetched, I suppose; although... + o _ _ _ + _o /\_ _ \\o (_)\__/o (_) + _< \_ _>(_) (_)/<_ \_| \ _|/' \/ + (_)>(_) (_) (_) (_) (_)' _\o_ + + /// Bram Moolenaar -- Bram@Moolenaar.net -- http://www.Moolenaar.net \\\ +/// sponsor Vim, vote for features -- http://www.Vim.org/sponsor/ \\\ +\\\ download, build and distribute -- http://www.A-A-P.org /// + \\\ help me help AIDS victims -- http://ICCF-Holland.org /// --- vim-7.0.orig/upstream/patches/get_patches.py +++ vim-7.0/upstream/patches/get_patches.py @@ -0,0 +1,46 @@ +#!/usr/bin/python +# +# Copyright (C) 2006, Stefano Zacchiroli +# +# This program is free software; you can redistribute it and/or modify it under +# the terms of the GNU General Public License as published by the Free Software +# Foundation; either version 2 of the License, or (at your option) any later +# version. +# +# $Id: get_patches.py 762 2006-09-09 14:17:16Z zack $ + +host='ftp.vim.org' +dir='pub/vim/patches/7.0' + +import os +import re +import string + +from ftplib import FTP + +patch_RE = re.compile(r'^\d+\.\d+\.\d+$') + +print 'connecting to %s' % host + +ftp=FTP(host) +ftp.login() + +patches = [] + +files = ftp.nlst(dir) +for f in files: + base = os.path.basename(f) + if patch_RE.match(base) and not os.path.isfile(base): + print 'patch %s is missing here: retrieving it from %s ...' % (base, host) + ftp.retrbinary('RETR %s' % f, open(base, 'w').write) + patches.append(base) + +if patches: + print 'updating debian/README to latest upstream ...' + ftp.retrbinary('RETR %s/README' % dir, + open('../../debian/README', 'w').write) + print 'adding downloaded patches to the SVN repository ...' + os.system('svn add %s' % string.join(patches)) + +print 'All done.' + --- vim-7.0.orig/upstream/patches/7.0.094 +++ vim-7.0/upstream/patches/7.0.094 @@ -0,0 +1,73 @@ +To: vim-dev@vim.org +Subject: Patch 7.0.094 +Fcc: outbox +From: Bram Moolenaar +Mime-Version: 1.0 +Content-Type: text/plain; charset=ISO-8859-1 +Content-Transfer-Encoding: 8bit +------------ + +Patch 7.0.094 +Problem: When a hidden buffer is made the current buffer and another file + edited later, the file message will still be given. Using + ":silent" also doesn't prevent the file message. (Marvin Renich) +Solution: Reset the need_fileinfo flag when reading a file. Don't set + need_fileinfo when msg_silent is set. +Files: src/buffer.c, src/fileio.c + + +*** ../vim-7.0.093/src/buffer.c Tue Sep 5 16:29:38 2006 +--- src/buffer.c Thu Sep 7 21:43:41 2006 +*************** +*** 1386,1392 **** + } + else + { +! need_fileinfo = TRUE; /* display file info after redraw */ + (void)buf_check_timestamp(curbuf, FALSE); /* check if file changed */ + #ifdef FEAT_AUTOCMD + curwin->w_topline = 1; +--- 1386,1393 ---- + } + else + { +! if (!msg_silent) +! need_fileinfo = TRUE; /* display file info after redraw */ + (void)buf_check_timestamp(curbuf, FALSE); /* check if file changed */ + #ifdef FEAT_AUTOCMD + curwin->w_topline = 1; +*** ../vim-7.0.093/src/fileio.c Tue Aug 29 18:16:37 2006 +--- src/fileio.c Wed Sep 6 22:54:19 2006 +*************** +*** 316,321 **** +--- 316,324 ---- + * display the line. */ + ex_no_reprint = TRUE; + ++ /* don't display the file info for another buffer now */ ++ need_fileinfo = FALSE; ++ + /* + * For Unix: Use the short file name whenever possible. + * Avoids problems with networks and when directory names are changed. +*** ../vim-7.0.093/src/version.c Sat Sep 9 13:36:51 2006 +--- src/version.c Sat Sep 9 14:19:04 2006 +*************** +*** 668,669 **** +--- 668,671 ---- + { /* Add new patch number below this line */ ++ /**/ ++ 94, + /**/ + +-- +ARTHUR: A scratch? Your arm's off! +BLACK KNIGHT: No, it isn't. +ARTHUR: Well, what's that then? +BLACK KNIGHT: I've had worse. + The Quest for the Holy Grail (Monty Python) + + /// Bram Moolenaar -- Bram@Moolenaar.net -- http://www.Moolenaar.net \\\ +/// sponsor Vim, vote for features -- http://www.Vim.org/sponsor/ \\\ +\\\ download, build and distribute -- http://www.A-A-P.org /// + \\\ help me help AIDS victims -- http://ICCF-Holland.org /// --- vim-7.0.orig/upstream/patches/7.0.109 +++ vim-7.0/upstream/patches/7.0.109 @@ -0,0 +1,70 @@ +To: vim-dev@vim.org +Subject: Patch 7.0.109 +Fcc: outbox +From: Bram Moolenaar +Mime-Version: 1.0 +Content-Type: text/plain; charset=ISO-8859-1 +Content-Transfer-Encoding: 8bit +------------ + +Patch 7.0.109 +Problem: Lisp indenting is confused by escaped quotes in strings. (Dorai + Sitaram) +Solution: Check for backslash inside strings. (Sergey Khorev) +Files: src/misc1.c + + +*** ../vim-7.0.108/src/misc1.c Tue Sep 5 20:56:11 2006 +--- src/misc1.c Wed Sep 13 20:13:57 2006 +*************** +*** 8074,8082 **** + } + if (*that == '"' && *(that + 1) != NUL) + { +! that++; +! while (*that && (*that != '"' || *(that - 1) == '\\')) +! ++that; + } + if (*that == '(' || *that == '[') + ++parencount; +--- 8074,8093 ---- + } + if (*that == '"' && *(that + 1) != NUL) + { +! while (*++that && *that != '"') +! { +! /* skipping escaped characters in the string */ +! if (*that == '\\') +! { +! if (*++that == NUL) +! break; +! if (that[1] == NUL) +! { +! ++that; +! break; +! } +! } +! } + } + if (*that == '(' || *that == '[') + ++parencount; +*** ../vim-7.0.108/src/version.c Thu Sep 14 21:36:35 2006 +--- src/version.c Fri Sep 15 20:15:40 2006 +*************** +*** 668,669 **** +--- 668,671 ---- + { /* Add new patch number below this line */ ++ /**/ ++ 109, + /**/ + +-- +ARTHUR: No, hang on! Just answer the five questions ... +GALAHAD: Three questions ... +ARTHUR: Three questions ... And we shall watch ... and pray. + "Monty Python and the Holy Grail" PYTHON (MONTY) PICTURES LTD + + /// Bram Moolenaar -- Bram@Moolenaar.net -- http://www.Moolenaar.net \\\ +/// sponsor Vim, vote for features -- http://www.Vim.org/sponsor/ \\\ +\\\ download, build and distribute -- http://www.A-A-P.org /// + \\\ help me help AIDS victims -- http://ICCF-Holland.org /// --- vim-7.0.orig/upstream/patches/7.0.149 +++ vim-7.0/upstream/patches/7.0.149 @@ -0,0 +1,186 @@ +To: vim-dev@vim.org +Subject: Patch 7.0.149 +Fcc: outbox +From: Bram Moolenaar +Mime-Version: 1.0 +Content-Type: text/plain; charset=ISO-8859-1 +Content-Transfer-Encoding: 8bit +------------ + +Patch 7.0.149 +Problem: When resizing a window that shows "~" lines the text sometimes + jumps down. +Solution: Remove code that uses "~" lines in some situations. Fix the + computation of the screen line of the cursor. Also set w_skipcol + to handle very long lines. +Files: src/misc1.c, src/window.c + + +*** ../vim-7.0.148/src/misc1.c Tue Oct 17 11:12:28 2006 +--- src/misc1.c Tue Oct 24 17:33:39 2006 +*************** +*** 1761,1775 **** + * Add column offset for 'number', 'foldcolumn', etc. + */ + width = W_WIDTH(wp) - win_col_off(wp); +! if (width > 0) +! { +! lines += 1; +! if (col >= width) +! lines += (col - width) / (width + win_col_off2(wp)); +! if (lines <= wp->w_height) +! return lines; +! } +! return (int)(wp->w_height); /* maximum length */ + } + + int +--- 1761,1773 ---- + * Add column offset for 'number', 'foldcolumn', etc. + */ + width = W_WIDTH(wp) - win_col_off(wp); +! if (width <= 0) +! return 9999; +! +! lines += 1; +! if (col > width) +! lines += (col - width) / (width + win_col_off2(wp)) + 1; +! return lines; + } + + int +*** ../vim-7.0.148/src/window.c Tue Sep 5 16:29:38 2006 +--- src/window.c Tue Oct 24 20:39:56 2006 +*************** +*** 5189,5199 **** + int height; + { + linenr_T lnum; +- linenr_T bot; + int sline, line_size; +- int space; +- int did_below = FALSE; +- int old_height = wp->w_height; + #define FRACTION_MULT 16384L + + /* Don't want a negative height. Happens when splitting a tiny window. +--- 5189,5195 ---- +*************** +*** 5228,5281 **** + wp->w_wrow = ((long)wp->w_fraction * (long)height - 1L) / FRACTION_MULT; + line_size = plines_win_col(wp, lnum, (long)(wp->w_cursor.col)) - 1; + sline = wp->w_wrow - line_size; + if (sline < 0) + { + /* + * Cursor line would go off top of screen if w_wrow was this high. + */ + wp->w_wrow = line_size; + } + else + { +! space = height - 1; +! +! while (lnum > 1) + { +- /* When using "~" lines stop when at the old topline, don't +- * scroll down. */ +- if (did_below && height < old_height && lnum <= wp->w_topline) +- sline = 0; +- +- space -= line_size; +- if (space > 0 && sline <= 0 && !did_below) +- { +- /* Try to use "~" lines below the text to avoid that text +- * is above the window while there are empty lines. +- * Subtract the rows below the cursor from "space" and +- * give the rest to "sline". */ +- did_below = TRUE; +- bot = wp->w_cursor.lnum; +- while (space > 0) +- { +- if (wp->w_buffer->b_ml.ml_line_count - bot >= space) +- space = 0; +- else +- { +- #ifdef FEAT_FOLDING +- hasFoldingWin(wp, bot, NULL, &bot, TRUE, NULL); +- #endif +- if (bot >= wp->w_buffer->b_ml.ml_line_count) +- break; +- ++bot; +- space -= plines_win(wp, bot, TRUE); +- } +- } +- if (bot == wp->w_buffer->b_ml.ml_line_count && space > 0) +- sline += space; +- } +- if (sline <= 0) +- break; +- + #ifdef FEAT_FOLDING + hasFoldingWin(wp, lnum, &lnum, NULL, TRUE, NULL); + if (lnum == 1) +--- 5224,5267 ---- + wp->w_wrow = ((long)wp->w_fraction * (long)height - 1L) / FRACTION_MULT; + line_size = plines_win_col(wp, lnum, (long)(wp->w_cursor.col)) - 1; + sline = wp->w_wrow - line_size; ++ ++ if (sline >= 0) ++ { ++ /* Make sure the whole cursor line is visible, if possible. */ ++ int rows = plines_win(wp, lnum, FALSE); ++ ++ if (sline > wp->w_height - rows) ++ { ++ sline = wp->w_height - rows; ++ wp->w_wrow -= rows - line_size; ++ } ++ } ++ + if (sline < 0) + { + /* + * Cursor line would go off top of screen if w_wrow was this high. ++ * Make cursor line the first line in the window. If not enough ++ * room use w_skipcol; + */ + wp->w_wrow = line_size; ++ if (wp->w_wrow >= wp->w_height ++ && (W_WIDTH(wp) - win_col_off(wp)) > 0) ++ { ++ wp->w_skipcol += W_WIDTH(wp) - win_col_off(wp); ++ --wp->w_wrow; ++ while (wp->w_wrow >= wp->w_height) ++ { ++ wp->w_skipcol += W_WIDTH(wp) - win_col_off(wp) ++ + win_col_off2(wp); ++ --wp->w_wrow; ++ } ++ } + } + else + { +! while (sline > 0 && lnum > 1) + { + #ifdef FEAT_FOLDING + hasFoldingWin(wp, lnum, &lnum, NULL, TRUE, NULL); + if (lnum == 1) +*** ../vim-7.0.148/src/version.c Tue Oct 24 13:51:47 2006 +--- src/version.c Tue Oct 24 21:13:31 2006 +*************** +*** 668,669 **** +--- 668,671 ---- + { /* Add new patch number below this line */ ++ /**/ ++ 149, + /**/ + +-- +hundred-and-one symptoms of being an internet addict: +104. When people ask about the Presidential Election you ask "Which country?" + + /// Bram Moolenaar -- Bram@Moolenaar.net -- http://www.Moolenaar.net \\\ +/// sponsor Vim, vote for features -- http://www.Vim.org/sponsor/ \\\ +\\\ download, build and distribute -- http://www.A-A-P.org /// + \\\ help me help AIDS victims -- http://ICCF-Holland.org /// --- vim-7.0.orig/upstream/patches/7.0.089 +++ vim-7.0/upstream/patches/7.0.089 @@ -0,0 +1,97 @@ +To: vim-dev@vim.org +Subject: Patch 7.0.089 +Fcc: outbox +From: Bram Moolenaar +Mime-Version: 1.0 +Content-Type: text/plain; charset=ISO-8859-1 +Content-Transfer-Encoding: 8bit +------------ + +Patch 7.0.089 +Problem: "ga" does not work properly for a non-Unicode multi-byte encoding. +Solution: Only check for composing chars for utf-8. (Taro Muraoka) +Files: src/ex_cmds.c + + +*** ../vim-7.0.088/src/ex_cmds.c Tue Sep 5 16:29:38 2006 +--- src/ex_cmds.c Tue Sep 5 18:12:41 2006 +*************** +*** 95,101 **** + _("<%s>%s%s %d, Hex %02x, Octal %03o"), + transchar(c), buf1, buf2, c, c, c); + #ifdef FEAT_MBYTE +! c = cc[ci++]; + #endif + } + +--- 95,104 ---- + _("<%s>%s%s %d, Hex %02x, Octal %03o"), + transchar(c), buf1, buf2, c, c, c); + #ifdef FEAT_MBYTE +! if (enc_utf8) +! c = cc[ci++]; +! else +! c = 0; + #endif + } + +*************** +*** 108,114 **** + if (len > 0) + IObuff[len++] = ' '; + IObuff[len++] = '<'; +! if (utf_iscomposing(c) + # ifdef USE_GUI + && !gui.in_use + # endif +--- 111,117 ---- + if (len > 0) + IObuff[len++] = ' '; + IObuff[len++] = '<'; +! if (enc_utf8 && utf_iscomposing(c) + # ifdef USE_GUI + && !gui.in_use + # endif +*************** +*** 120,126 **** + : _("> %d, Hex %08x, Octal %o"), c, c, c); + if (ci == MAX_MCO) + break; +! c = cc[ci++]; + } + #endif + +--- 123,132 ---- + : _("> %d, Hex %08x, Octal %o"), c, c, c); + if (ci == MAX_MCO) + break; +! if (enc_utf8) +! c = cc[ci++]; +! else +! c = 0; + } + #endif + +*** ../vim-7.0.088/src/version.c Tue Sep 5 17:30:25 2006 +--- src/version.c Tue Sep 5 18:19:42 2006 +*************** +*** 668,669 **** +--- 668,671 ---- + { /* Add new patch number below this line */ ++ /**/ ++ 89, + /**/ + +-- + [clop clop] +GUARD #1: Halt! Who goes there? +ARTHUR: It is I, Arthur, son of Uther Pendragon, from the castle of + Camelot. King of the Britons, defeator of the Saxons, sovereign of + all England! +GUARD #1: Pull the other one! + The Quest for the Holy Grail (Monty Python) + + /// Bram Moolenaar -- Bram@Moolenaar.net -- http://www.Moolenaar.net \\\ +/// sponsor Vim, vote for features -- http://www.Vim.org/sponsor/ \\\ +\\\ download, build and distribute -- http://www.A-A-P.org /// + \\\ help me help AIDS victims -- http://ICCF-Holland.org /// --- vim-7.0.orig/upstream/patches/7.0.056 +++ vim-7.0/upstream/patches/7.0.056 @@ -0,0 +1,49 @@ +To: vim-dev@vim.org +Subject: Patch 7.0.056 +Fcc: outbox +From: Bram Moolenaar +Mime-Version: 1.0 +Content-Type: text/plain; charset=ISO-8859-1 +Content-Transfer-Encoding: 8bit +------------ + +Patch 7.0.056 +Problem: "#!something" gives an error message. +Solution: Ignore this line, so that it can be used in an executable Vim + script. +Files: src/ex_docmd.c + + +*** ../vim-7.0.055/src/ex_docmd.c Sat May 13 12:36:18 2006 +--- src/ex_docmd.c Thu Aug 10 23:50:32 2006 +*************** +*** 1709,1714 **** +--- 1712,1721 ---- + */ + save_cmdmod = cmdmod; + vim_memset(&cmdmod, 0, sizeof(cmdmod)); ++ ++ /* "#!anything" is handled like a comment. */ ++ if ((*cmdlinep)[0] == '#' && (*cmdlinep)[1] == '!') ++ goto doend; + + /* + * Repeat until no more command modifiers are found. +*** ../vim-7.0.055/src/version.c Wed Aug 16 16:24:58 2006 +--- src/version.c Wed Aug 16 17:05:35 2006 +*************** +*** 668,669 **** +--- 668,671 ---- + { /* Add new patch number below this line */ ++ /**/ ++ 56, + /**/ + +-- +hundred-and-one symptoms of being an internet addict: +158. You get a tuner card so you can watch TV while surfing. + + /// Bram Moolenaar -- Bram@Moolenaar.net -- http://www.Moolenaar.net \\\ +/// sponsor Vim, vote for features -- http://www.Vim.org/sponsor/ \\\ +\\\ download, build and distribute -- http://www.A-A-P.org /// + \\\ help me help AIDS victims -- http://ICCF-Holland.org /// --- vim-7.0.orig/upstream/patches/7.0.069 +++ vim-7.0/upstream/patches/7.0.069 @@ -0,0 +1,53 @@ +To: vim-dev@vim.org +Subject: Patch 7.0.069 +Fcc: outbox +From: Bram Moolenaar +Mime-Version: 1.0 +Content-Type: text/plain; charset=ISO-8859-1 +Content-Transfer-Encoding: 8bit +------------ + +Patch 7.0.069 +Problem: Setting 'guitablabel' to %!expand(\%) causes Vim to free an + invalid pointer. (Kim Schulz) +Solution: Don't try freeing a constant string pointer. +Files: src/buffer.c + + +*** ../vim-7.0.068/src/buffer.c Wed Aug 16 19:34:59 2006 +--- src/buffer.c Tue Aug 29 16:23:49 2006 +*************** +*** 3324,3330 **** + { + usefmt = eval_to_string_safe(fmt + 2, NULL, use_sandbox); + if (usefmt == NULL) +! usefmt = (char_u *)""; + } + #endif + +--- 3324,3330 ---- + { + usefmt = eval_to_string_safe(fmt + 2, NULL, use_sandbox); + if (usefmt == NULL) +! usefmt = fmt; + } + #endif + +*** ../vim-7.0.068/src/version.c Tue Aug 29 16:33:23 2006 +--- src/version.c Tue Aug 29 16:48:08 2006 +*************** +*** 668,669 **** +--- 668,671 ---- + { /* Add new patch number below this line */ ++ /**/ ++ 69, + /**/ + +-- +Two fish in a tank. One says to the other: +"Do you know how to drive this thing?" + + /// Bram Moolenaar -- Bram@Moolenaar.net -- http://www.Moolenaar.net \\\ +/// sponsor Vim, vote for features -- http://www.Vim.org/sponsor/ \\\ +\\\ download, build and distribute -- http://www.A-A-P.org /// + \\\ help me help AIDS victims -- http://ICCF-Holland.org /// --- vim-7.0.orig/upstream/patches/7.0.060 +++ vim-7.0/upstream/patches/7.0.060 @@ -0,0 +1,723 @@ +To: vim-dev@vim.org +Subject: Patch 7.0.060 +Fcc: outbox +From: Bram Moolenaar +Mime-Version: 1.0 +Content-Type: text/plain; charset=ISO-8859-1 +Content-Transfer-Encoding: 8bit +------------ + +Patch 7.0.060 (after 7.0.51) +Problem: Code for temporarily switching to another buffer is duplicated in + quite a few places. +Solution: Use aucmd_prepbuf() and aucmd_restbuf() also when FEAT_AUTOCMD is + not defined. +Files: src/buffer.c, src/eval.c, src/fileio.c, src/if_ruby.c, + src/if_perl.xs, src/quickfix.c, src/structs.h + + +*** ../vim-7.0.059/src/buffer.c Thu Apr 27 01:49:30 2006 +--- src/buffer.c Wed Aug 16 14:36:17 2006 +*************** +*** 5420,5430 **** + buf_T *newbuf; + int differ = TRUE; + linenr_T lnum; +- #ifdef FEAT_AUTOCMD + aco_save_T aco; +- #else +- buf_T *old_curbuf = curbuf; +- #endif + exarg_T ea; + + /* Allocate a buffer without putting it in the buffer list. */ +--- 5420,5426 ---- +*************** +*** 5439,5451 **** + return TRUE; + } + +- #ifdef FEAT_AUTOCMD + /* set curwin/curbuf to buf and save a few things */ + aucmd_prepbuf(&aco, newbuf); +- #else +- curbuf = newbuf; +- curwin->w_buffer = newbuf; +- #endif + + if (ml_open(curbuf) == OK + && readfile(buf->b_ffname, buf->b_fname, +--- 5435,5442 ---- +*************** +*** 5466,5478 **** + } + vim_free(ea.cmd); + +- #ifdef FEAT_AUTOCMD + /* restore curwin/curbuf and a few other things */ + aucmd_restbuf(&aco); +- #else +- curbuf = old_curbuf; +- curwin->w_buffer = old_curbuf; +- #endif + + if (curbuf != newbuf) /* safety check */ + wipe_buffer(newbuf, FALSE); +--- 5457,5464 ---- +*** ../vim-7.0.059/src/eval.c Sun Jul 23 22:07:55 2006 +--- src/eval.c Wed Aug 16 14:38:32 2006 +*************** +*** 14184,14194 **** + typval_T *rettv; + { + buf_T *buf; +- #ifdef FEAT_AUTOCMD + aco_save_T aco; +- #else +- buf_T *save_curbuf; +- #endif + char_u *varname, *bufvarname; + typval_T *varp; + char_u nbuf[NUMBUFLEN]; +--- 14184,14190 ---- +*************** +*** 14205,14216 **** + if (buf != NULL && varname != NULL && varp != NULL) + { + /* set curbuf to be our buf, temporarily */ +- #ifdef FEAT_AUTOCMD + aucmd_prepbuf(&aco, buf); +- #else +- save_curbuf = curbuf; +- curbuf = buf; +- #endif + + if (*varname == '&') + { +--- 14201,14207 ---- +*************** +*** 14237,14247 **** + } + + /* reset notion of buffer */ +- #ifdef FEAT_AUTOCMD + aucmd_restbuf(&aco); +- #else +- curbuf = save_curbuf; +- #endif + } + } + +--- 14228,14234 ---- +*** ../vim-7.0.059/src/fileio.c Sun Apr 30 20:33:48 2006 +--- src/fileio.c Wed Aug 16 14:39:23 2006 +*************** +*** 6450,6466 **** + int old_ro = buf->b_p_ro; + buf_T *savebuf; + int saved = OK; +- #ifdef FEAT_AUTOCMD + aco_save_T aco; + + /* set curwin/curbuf for "buf" and save some things */ + aucmd_prepbuf(&aco, buf); +- #else +- buf_T *save_curbuf = curbuf; +- +- curbuf = buf; +- curwin->w_buffer = buf; +- #endif + + /* We only want to read the text from the file, not reset the syntax + * highlighting, clear marks, diff status, etc. Force the fileformat +--- 6450,6459 ---- +*************** +*** 6573,6586 **** + curbuf->b_p_ro |= old_ro; + } + +- #ifdef FEAT_AUTOCMD + /* restore curwin/curbuf and a few other things */ + aucmd_restbuf(&aco); + /* Careful: autocommands may have made "buf" invalid! */ +- #else +- curwin->w_buffer = save_curbuf; +- curbuf = save_curbuf; +- #endif + } + + /*ARGSUSED*/ +--- 6566,6574 ---- +*************** +*** 8088,8093 **** +--- 8076,8082 ---- + * Search a window for the current buffer. Save the cursor position and + * screen offset. + * Set "curbuf" and "curwin" to match "buf". ++ * When FEAT_AUTOCMD is not defined another version is used, see below. + */ + void + aucmd_prepbuf(aco, buf) +*************** +*** 8151,8156 **** +--- 8140,8146 ---- + /* + * Cleanup after executing autocommands for a (hidden) buffer. + * Restore the window as it was (if possible). ++ * When FEAT_AUTOCMD is not defined another version is used, see below. + */ + void + aucmd_restbuf(aco) +*************** +*** 9063,9069 **** +--- 9053,9089 ---- + return retval; + } + ++ #else /* FEAT_AUTOCMD */ ++ ++ /* ++ * Prepare for executing commands for (hidden) buffer "buf". ++ * This is the non-autocommand version, it simply saves "curbuf" and sets ++ * "curbuf" and "curwin" to match "buf". ++ */ ++ void ++ aucmd_prepbuf(aco, buf) ++ aco_save_T *aco; /* structure to save values in */ ++ buf_T *buf; /* new curbuf */ ++ { ++ aco->save_buf = buf; ++ curbuf = buf; ++ curwin->w_buffer = buf; ++ } ++ ++ /* ++ * Restore after executing commands for a (hidden) buffer. ++ * This is the non-autocommand version. ++ */ ++ void ++ aucmd_restbuf(aco) ++ aco_save_T *aco; /* structure holding saved values */ ++ { ++ curbuf = aco->save_buf; ++ curwin->w_buffer = curbuf; ++ } ++ + #endif /* FEAT_AUTOCMD */ ++ + + #if defined(FEAT_AUTOCMD) || defined(FEAT_WILDIGN) || defined(PROTO) + /* +*** ../vim-7.0.059/src/if_ruby.c Tue Jun 20 21:08:02 2006 +--- src/if_ruby.c Wed Aug 16 14:41:11 2006 +*************** +*** 644,664 **** + static VALUE set_buffer_line(buf_T *buf, linenr_T n, VALUE str) + { + char *line = STR2CSTR(str); +- #ifdef FEAT_AUTOCMD + aco_save_T aco; +- #else +- buf_T *save_curbuf = curbuf; +- #endif + + if (n > 0 && n <= buf->b_ml.ml_line_count && line != NULL) + { +- #ifdef FEAT_AUTOCMD + /* set curwin/curbuf for "buf" and save some things */ + aucmd_prepbuf(&aco, buf); +- #else +- curbuf = buf; +- curwin->w_buffer = buf; +- #endif + + if (u_savesub(n) == OK) { + ml_replace(n, (char_u *)line, TRUE); +--- 644,655 ---- +*************** +*** 668,681 **** + #endif + } + +- #ifdef FEAT_AUTOCMD + /* restore curwin/curbuf and a few other things */ + aucmd_restbuf(&aco); + /* Careful: autocommands may have made "buf" invalid! */ +! #else +! curwin->w_buffer = save_curbuf; +! curbuf = save_curbuf; +! #endif + update_curbuf(NOT_VALID); + } + else +--- 659,668 ---- + #endif + } + + /* restore curwin/curbuf and a few other things */ + aucmd_restbuf(&aco); + /* Careful: autocommands may have made "buf" invalid! */ +! + update_curbuf(NOT_VALID); + } + else +*************** +*** 699,719 **** + { + buf_T *buf = get_buf(self); + long n = NUM2LONG(num); +- #ifdef FEAT_AUTOCMD + aco_save_T aco; +- #else +- buf_T *save_curbuf = curbuf; +- #endif + + if (n > 0 && n <= buf->b_ml.ml_line_count) + { +- #ifdef FEAT_AUTOCMD + /* set curwin/curbuf for "buf" and save some things */ + aucmd_prepbuf(&aco, buf); +- #else +- curbuf = buf; +- curwin->w_buffer = buf; +- #endif + + if (u_savedel(n, 1) == OK) { + ml_delete(n, 0); +--- 686,697 ---- +*************** +*** 725,738 **** + changed(); + } + +- #ifdef FEAT_AUTOCMD + /* restore curwin/curbuf and a few other things */ + aucmd_restbuf(&aco); + /* Careful: autocommands may have made "buf" invalid! */ +! #else +! curwin->w_buffer = save_curbuf; +! curbuf = save_curbuf; +! #endif + update_curbuf(NOT_VALID); + } + else +--- 703,712 ---- + changed(); + } + + /* restore curwin/curbuf and a few other things */ + aucmd_restbuf(&aco); + /* Careful: autocommands may have made "buf" invalid! */ +! + update_curbuf(NOT_VALID); + } + else +*************** +*** 747,767 **** + buf_T *buf = get_buf(self); + char *line = STR2CSTR(str); + long n = NUM2LONG(num); +- #ifdef FEAT_AUTOCMD + aco_save_T aco; +- #else +- buf_T *save_curbuf = curbuf; +- #endif + + if (n >= 0 && n <= buf->b_ml.ml_line_count && line != NULL) + { +- #ifdef FEAT_AUTOCMD + /* set curwin/curbuf for "buf" and save some things */ + aucmd_prepbuf(&aco, buf); +- #else +- curbuf = buf; +- curwin->w_buffer = buf; +- #endif + + if (u_inssub(n + 1) == OK) { + ml_append(n, (char_u *) line, (colnr_T) 0, FALSE); +--- 721,732 ---- +*************** +*** 773,786 **** + changed(); + } + +- #ifdef FEAT_AUTOCMD + /* restore curwin/curbuf and a few other things */ + aucmd_restbuf(&aco); + /* Careful: autocommands may have made "buf" invalid! */ +! #else +! curwin->w_buffer = save_curbuf; +! curbuf = save_curbuf; +! #endif + update_curbuf(NOT_VALID); + } + else { +--- 738,747 ---- + changed(); + } + + /* restore curwin/curbuf and a few other things */ + aucmd_restbuf(&aco); + /* Careful: autocommands may have made "buf" invalid! */ +! + update_curbuf(NOT_VALID); + } + else { +*** ../vim-7.0.059/src/if_perl.xs Wed Aug 16 18:19:41 2006 +--- src/if_perl.xs Wed Aug 16 14:45:15 2006 +*************** +*** 1068,1097 **** + line = SvPV(ST(i),PL_na); + if (lnum > 0 && lnum <= vimbuf->b_ml.ml_line_count && line != NULL) + { +- #ifdef FEAT_AUTOCMD + aco_save_T aco; + + /* set curwin/curbuf for "vimbuf" and save some things */ + aucmd_prepbuf(&aco, vimbuf); +- #else +- buf_T *save_curbuf = curbuf; + +- curbuf = vimbuf; +- curwin->w_buffer = vimbuf; +- #endif + if (u_savesub(lnum) == OK) + { + ml_replace(lnum, (char_u *)line, TRUE); + changed_bytes(lnum, 0); + } +! #ifdef FEAT_AUTOCMD + /* restore curwin/curbuf and a few other things */ + aucmd_restbuf(&aco); + /* Careful: autocommands may have made "vimbuf" invalid! */ +- #else +- curwin->w_buffer = save_curbuf; +- curbuf = save_curbuf; +- #endif + } + } + } +--- 1068,1087 ---- + line = SvPV(ST(i),PL_na); + if (lnum > 0 && lnum <= vimbuf->b_ml.ml_line_count && line != NULL) + { + aco_save_T aco; + + /* set curwin/curbuf for "vimbuf" and save some things */ + aucmd_prepbuf(&aco, vimbuf); + + if (u_savesub(lnum) == OK) + { + ml_replace(lnum, (char_u *)line, TRUE); + changed_bytes(lnum, 0); + } +! + /* restore curwin/curbuf and a few other things */ + aucmd_restbuf(&aco); + /* Careful: autocommands may have made "vimbuf" invalid! */ + } + } + } +*************** +*** 1128,1158 **** + { + if (lnum > 0 && lnum <= vimbuf->b_ml.ml_line_count) + { +- buf_T *save_curbuf = curbuf; +- #ifdef FEAT_AUTOCMD + aco_save_T aco; + + /* set curwin/curbuf for "vimbuf" and save some things */ + aucmd_prepbuf(&aco, vimbuf); +! #else +! curbuf = vimbuf; +! curwin->w_buffer = vimbuf; +! #endif + if (u_savedel(lnum, 1) == OK) + { + ml_delete(lnum, 0); + deleted_lines_mark(lnum, 1L); +! if (save_curbuf == curbuf) + check_cursor(); + } +! #ifdef FEAT_AUTOCMD + /* restore curwin/curbuf and a few other things */ + aucmd_restbuf(&aco); + /* Careful: autocommands may have made "vimbuf" invalid! */ +! #else +! curwin->w_buffer = save_curbuf; +! curbuf = save_curbuf; +! #endif + update_curbuf(VALID); + } + } +--- 1118,1140 ---- + { + if (lnum > 0 && lnum <= vimbuf->b_ml.ml_line_count) + { + aco_save_T aco; + + /* set curwin/curbuf for "vimbuf" and save some things */ + aucmd_prepbuf(&aco, vimbuf); +! + if (u_savedel(lnum, 1) == OK) + { + ml_delete(lnum, 0); + deleted_lines_mark(lnum, 1L); +! if (aco.save_buf == curbuf) + check_cursor(); + } +! + /* restore curwin/curbuf and a few other things */ + aucmd_restbuf(&aco); + /* Careful: autocommands may have made "vimbuf" invalid! */ +! + update_curbuf(VALID); + } + } +*************** +*** 1179,1208 **** + line = SvPV(ST(i),PL_na); + if (lnum >= 0 && lnum <= vimbuf->b_ml.ml_line_count && line != NULL) + { +- #ifdef FEAT_AUTOCMD + aco_save_T aco; + + /* set curwin/curbuf for "vimbuf" and save some things */ + aucmd_prepbuf(&aco, vimbuf); +- #else +- buf_T *save_curbuf = curbuf; + +- curbuf = vimbuf; +- curwin->w_buffer = vimbuf; +- #endif + if (u_inssub(lnum + 1) == OK) + { + ml_append(lnum, (char_u *)line, (colnr_T)0, FALSE); + appended_lines_mark(lnum, 1L); + } +! #ifdef FEAT_AUTOCMD + /* restore curwin/curbuf and a few other things */ + aucmd_restbuf(&aco); + /* Careful: autocommands may have made "vimbuf" invalid! */ +! #else +! curwin->w_buffer = save_curbuf; +! curbuf = save_curbuf; +! #endif + update_curbuf(VALID); + } + } +--- 1161,1181 ---- + line = SvPV(ST(i),PL_na); + if (lnum >= 0 && lnum <= vimbuf->b_ml.ml_line_count && line != NULL) + { + aco_save_T aco; + + /* set curwin/curbuf for "vimbuf" and save some things */ + aucmd_prepbuf(&aco, vimbuf); + + if (u_inssub(lnum + 1) == OK) + { + ml_append(lnum, (char_u *)line, (colnr_T)0, FALSE); + appended_lines_mark(lnum, 1L); + } +! + /* restore curwin/curbuf and a few other things */ + aucmd_restbuf(&aco); + /* Careful: autocommands may have made "vimbuf" invalid! */ +! + update_curbuf(VALID); + } + } +*** ../vim-7.0.059/src/quickfix.c Tue Jun 20 20:49:42 2006 +--- src/quickfix.c Wed Aug 16 14:43:06 2006 +*************** +*** 2463,2494 **** + qf_info_T *qi; + { + buf_T *buf; +- #ifdef FEAT_AUTOCMD + aco_save_T aco; +- #else +- buf_T *save_curbuf; +- #endif + + /* Check if a buffer for the quickfix list exists. Update it. */ + buf = qf_find_buf(qi); + if (buf != NULL) + { +- #ifdef FEAT_AUTOCMD + /* set curwin/curbuf to buf and save a few things */ + aucmd_prepbuf(&aco, buf); +- #else +- save_curbuf = curbuf; +- curbuf = buf; +- #endif + + qf_fill_buffer(qi); + +- #ifdef FEAT_AUTOCMD + /* restore curwin/curbuf and a few other things */ + aucmd_restbuf(&aco); +- #else +- curbuf = save_curbuf; +- #endif + + (void)qf_win_pos_update(qi, 0); + } +--- 2463,2481 ---- +*************** +*** 2977,2986 **** + #if defined(FEAT_AUTOCMD) && defined(FEAT_SYN_HL) + char_u *save_ei = NULL; + #endif +- #ifndef FEAT_AUTOCMD +- buf_T *save_curbuf; +- #else + aco_save_T aco; + char_u *au_name = NULL; + int flags = 0; + colnr_T col; +--- 2964,2971 ---- + #if defined(FEAT_AUTOCMD) && defined(FEAT_SYN_HL) + char_u *save_ei = NULL; + #endif + aco_save_T aco; ++ #ifdef FEAT_AUTOCMD + char_u *au_name = NULL; + int flags = 0; + colnr_T col; +*************** +*** 3201,3224 **** + * need to be done now, in that buffer. And the modelines + * need to be done (again). But not the window-local + * options! */ +- #if defined(FEAT_AUTOCMD) + aucmd_prepbuf(&aco, buf); +- #else +- save_curbuf = curbuf; +- curbuf = buf; +- curwin->w_buffer = curbuf; +- #endif + #if defined(FEAT_AUTOCMD) && defined(FEAT_SYN_HL) + apply_autocmds(EVENT_FILETYPE, buf->b_p_ft, + buf->b_fname, TRUE, buf); + #endif + do_modelines(OPT_NOWIN); +- #if defined(FEAT_AUTOCMD) + aucmd_restbuf(&aco); +- #else +- curbuf = save_curbuf; +- curwin->w_buffer = curbuf; +- #endif + } + } + } +--- 3186,3198 ---- +*************** +*** 3319,3329 **** + { + buf_T *newbuf; + int failed = TRUE; +- #ifdef FEAT_AUTOCMD + aco_save_T aco; +- #else +- buf_T *old_curbuf = curbuf; +- #endif + + /* Allocate a buffer without putting it in the buffer list. */ + newbuf = buflist_new(NULL, NULL, (linenr_T)1, BLN_DUMMY); +--- 3293,3299 ---- +*************** +*** 3333,3345 **** + /* Init the options. */ + buf_copy_options(newbuf, BCO_ENTER | BCO_NOHELP); + +- #ifdef FEAT_AUTOCMD + /* set curwin/curbuf to buf and save a few things */ + aucmd_prepbuf(&aco, newbuf); +- #else +- curbuf = newbuf; +- curwin->w_buffer = newbuf; +- #endif + + /* Need to set the filename for autocommands. */ + (void)setfname(curbuf, fname, NULL, FALSE); +--- 3303,3310 ---- +*************** +*** 3370,3382 **** + } + } + +- #ifdef FEAT_AUTOCMD + /* restore curwin/curbuf and a few other things */ + aucmd_restbuf(&aco); +- #else +- curbuf = old_curbuf; +- curwin->w_buffer = old_curbuf; +- #endif + + if (!buf_valid(newbuf)) + return NULL; +--- 3335,3342 ---- +*** ../vim-7.0.059/src/structs.h Sun Apr 9 23:52:16 2006 +--- src/structs.h Wed Aug 16 19:30:48 2006 +*************** +*** 2213,2230 **** + + /* + * Struct to save values in before executing autocommands for a buffer that is +! * not the current buffer. + */ + typedef struct + { + buf_T *save_buf; /* saved curbuf */ + buf_T *new_curbuf; /* buffer to be used */ + win_T *save_curwin; /* saved curwin, NULL if it didn't change */ + win_T *new_curwin; /* new curwin if save_curwin != NULL */ + pos_T save_cursor; /* saved cursor pos of save_curwin */ + linenr_T save_topline; /* saved topline of save_curwin */ +! #ifdef FEAT_DIFF + int save_topfill; /* saved topfill of save_curwin */ + #endif + } aco_save_T; + +--- 2213,2232 ---- + + /* + * Struct to save values in before executing autocommands for a buffer that is +! * not the current buffer. Without FEAT_AUTOCMD only "curbuf" is remembered. + */ + typedef struct + { + buf_T *save_buf; /* saved curbuf */ ++ #ifdef FEAT_AUTOCMD + buf_T *new_curbuf; /* buffer to be used */ + win_T *save_curwin; /* saved curwin, NULL if it didn't change */ + win_T *new_curwin; /* new curwin if save_curwin != NULL */ + pos_T save_cursor; /* saved cursor pos of save_curwin */ + linenr_T save_topline; /* saved topline of save_curwin */ +! # ifdef FEAT_DIFF + int save_topfill; /* saved topfill of save_curwin */ ++ # endif + #endif + } aco_save_T; + +*** ../vim-7.0.059/src/version.c Wed Aug 16 18:19:41 2006 +--- src/version.c Wed Aug 16 19:31:01 2006 +*************** +*** 668,669 **** +--- 668,671 ---- + { /* Add new patch number below this line */ ++ /**/ ++ 60, + /**/ + +-- +hundred-and-one symptoms of being an internet addict: +164. You got out to buy software, instead of going out for a beer. + + /// Bram Moolenaar -- Bram@Moolenaar.net -- http://www.Moolenaar.net \\\ +/// sponsor Vim, vote for features -- http://www.Vim.org/sponsor/ \\\ +\\\ download, build and distribute -- http://www.A-A-P.org /// + \\\ help me help AIDS victims -- http://ICCF-Holland.org /// --- vim-7.0.orig/upstream/patches/7.0.117 +++ vim-7.0/upstream/patches/7.0.117 @@ -0,0 +1,166 @@ +To: vim-dev@vim.org +Subject: Patch 7.0.117 +Fcc: outbox +From: Bram Moolenaar +Mime-Version: 1.0 +Content-Type: text/plain; charset=ISO-8859-1 +Content-Transfer-Encoding: 8bit +------------ + +Patch 7.0.117 +Problem: Using "extend" on a syntax item inside a region with "keepend", an + intermediate item may be truncated. + When applying the "keepend" and there is an offset to the end + pattern the highlighting of a contained item isn't adjusted. +Solution: Use the seen_keepend flag to remember when to apply the "keepend" + flag. Adjust the keepend highlighting properly. (Ilya Bobir) +Files: src/syntax.c + + +*** ../vim-7.0.116/src/syntax.c Thu Apr 27 01:58:59 2006 +--- src/syntax.c Tue Oct 3 17:00:44 2006 +*************** +*** 977,982 **** +--- 977,983 ---- + { + stateitem_T *cur_si; + int i; ++ int seen_keepend; + + if (startofline) + { +*************** +*** 1002,1008 **** + /* + * Need to update the end of a start/skip/end that continues from the + * previous line. And regions that have "keepend", because they may +! * influence contained items. + * Then check for items ending in column 0. + */ + i = current_state.ga_len - 1; +--- 1003,1012 ---- + /* + * Need to update the end of a start/skip/end that continues from the + * previous line. And regions that have "keepend", because they may +! * influence contained items. If we've just removed "extend" +! * (startofline == 0) then we should update ends of normal regions +! * contained inside "keepend" because "extend" could have extended +! * these "keepend" regions as well as contained normal regions. + * Then check for items ending in column 0. + */ + i = current_state.ga_len - 1; +*************** +*** 1010,1019 **** +--- 1014,1026 ---- + for ( ; i > keepend_level; --i) + if (CUR_STATE(i).si_flags & HL_EXTEND) + break; ++ ++ seen_keepend = FALSE; + for ( ; i < current_state.ga_len; ++i) + { + cur_si = &CUR_STATE(i); + if ((cur_si->si_flags & HL_KEEPEND) ++ || (seen_keepend && !startofline) + || (i == current_state.ga_len - 1 && startofline)) + { + cur_si->si_h_startpos.col = 0; /* start highl. in col 0 */ +*************** +*** 1021,1026 **** +--- 1028,1036 ---- + + if (!(cur_si->si_flags & HL_MATCHCONT)) + update_si_end(cur_si, (int)current_col, !startofline); ++ ++ if (!startofline && (cur_si->si_flags & HL_KEEPEND)) ++ seen_keepend = TRUE; + } + } + check_keepend(); +*************** +*** 2564,2569 **** +--- 2574,2580 ---- + { + int i; + lpos_T maxpos; ++ lpos_T maxpos_h; + stateitem_T *sip; + + /* +*************** +*** 2583,2605 **** + break; + + maxpos.lnum = 0; + for ( ; i < current_state.ga_len; ++i) + { + sip = &CUR_STATE(i); + if (maxpos.lnum != 0) + { + limit_pos_zero(&sip->si_m_endpos, &maxpos); +! limit_pos_zero(&sip->si_h_endpos, &maxpos); + limit_pos_zero(&sip->si_eoe_pos, &maxpos); + sip->si_ends = TRUE; + } +! if (sip->si_ends +! && (sip->si_flags & HL_KEEPEND) +! && (maxpos.lnum == 0 + || maxpos.lnum > sip->si_m_endpos.lnum + || (maxpos.lnum == sip->si_m_endpos.lnum +! && maxpos.col > sip->si_m_endpos.col))) +! maxpos = sip->si_m_endpos; + } + } + +--- 2594,2623 ---- + break; + + maxpos.lnum = 0; ++ maxpos_h.lnum = 0; + for ( ; i < current_state.ga_len; ++i) + { + sip = &CUR_STATE(i); + if (maxpos.lnum != 0) + { + limit_pos_zero(&sip->si_m_endpos, &maxpos); +! limit_pos_zero(&sip->si_h_endpos, &maxpos_h); + limit_pos_zero(&sip->si_eoe_pos, &maxpos); + sip->si_ends = TRUE; + } +! if (sip->si_ends && (sip->si_flags & HL_KEEPEND)) +! { +! if (maxpos.lnum == 0 + || maxpos.lnum > sip->si_m_endpos.lnum + || (maxpos.lnum == sip->si_m_endpos.lnum +! && maxpos.col > sip->si_m_endpos.col)) +! maxpos = sip->si_m_endpos; +! if (maxpos_h.lnum == 0 +! || maxpos_h.lnum > sip->si_h_endpos.lnum +! || (maxpos_h.lnum == sip->si_h_endpos.lnum +! && maxpos_h.col > sip->si_h_endpos.col)) +! maxpos_h = sip->si_h_endpos; +! } + } + } + +*** ../vim-7.0.116/src/version.c Tue Oct 3 16:30:40 2006 +--- src/version.c Tue Oct 3 16:59:50 2006 +*************** +*** 668,669 **** +--- 668,671 ---- + { /* Add new patch number below this line */ ++ /**/ ++ 117, + /**/ + +-- +For humans, honesty is a matter of degree. Engineers are always honest in +matters of technology and human relationships. That's why it's a good idea +to keep engineers away from customers, romantic interests, and other people +who can't handle the truth. + (Scott Adams - The Dilbert principle) + + /// Bram Moolenaar -- Bram@Moolenaar.net -- http://www.Moolenaar.net \\\ +/// sponsor Vim, vote for features -- http://www.Vim.org/sponsor/ \\\ +\\\ download, build and distribute -- http://www.A-A-P.org /// + \\\ help me help AIDS victims -- http://ICCF-Holland.org /// --- vim-7.0.orig/upstream/patches/7.0.009 +++ vim-7.0/upstream/patches/7.0.009 @@ -0,0 +1,54 @@ +To: vim-dev@vim.org +Subject: Patch 7.0.009 +Fcc: outbox +From: Bram Moolenaar +Mime-Version: 1.0 +Content-Type: text/plain; charset=ISO-8859-1 +Content-Transfer-Encoding: 8bit +------------ + +Patch 7.0.009 +Problem: ml_get errors with both 'sidescroll' and 'spell' set. +Solution: Use ml_get_buf() instead of ml_get(), get the line from the right + buffer, not the current one. +Files: src/spell.c + + +*** ../vim-7.0.008/src/spell.c Wed May 10 15:22:50 2006 +--- src/spell.c Tue May 9 18:55:04 2006 +*************** +*** 2108,2114 **** + * possible. */ + STRCPY(buf, line); + if (lnum < wp->w_buffer->b_ml.ml_line_count) +! spell_cat_line(buf + STRLEN(buf), ml_get(lnum + 1), MAXWLEN); + + p = buf + skip; + endp = buf + len; +--- 2108,2115 ---- + * possible. */ + STRCPY(buf, line); + if (lnum < wp->w_buffer->b_ml.ml_line_count) +! spell_cat_line(buf + STRLEN(buf), +! ml_get_buf(wp->w_buffer, lnum + 1, FALSE), MAXWLEN); + + p = buf + skip; + endp = buf + len; +*** ../vim-7.0.008/src/version.c Wed May 10 17:40:17 2006 +--- src/version.c Wed May 10 17:50:20 2006 +*************** +*** 668,669 **** +--- 668,671 ---- + { /* Add new patch number below this line */ ++ /**/ ++ 9, + /**/ + +-- +I AM THANKFUL... +...for the taxes that I pay because it means that I am employed. + + /// Bram Moolenaar -- Bram@Moolenaar.net -- http://www.Moolenaar.net \\\ +/// sponsor Vim, vote for features -- http://www.Vim.org/sponsor/ \\\ +\\\ download, build and distribute -- http://www.A-A-P.org /// + \\\ help me help AIDS victims -- http://ICCF-Holland.org /// --- vim-7.0.orig/upstream/patches/7.0.072 +++ vim-7.0/upstream/patches/7.0.072 @@ -0,0 +1,83 @@ +To: vim-dev@vim.org +Subject: Patch 7.0.072 +Fcc: outbox +From: Bram Moolenaar +Mime-Version: 1.0 +Content-Type: text/plain; charset=ISO-8859-1 +Content-Transfer-Encoding: 8bit +------------ + +Patch 7.0.072 +Problem: When starting the GUI fails there is no way to adjust settings or + do something else. +Solution: Add the GUIFailed autocommand event. +Files: src/fileio.c, src/gui.c, src/vim.h + + +*** ../vim-7.0.071/src/fileio.c Wed Aug 16 19:34:59 2006 +--- src/fileio.c Tue Aug 29 10:11:35 2006 +*************** +*** 6980,6985 **** +--- 6980,6986 ---- + {"FocusLost", EVENT_FOCUSLOST}, + {"FuncUndefined", EVENT_FUNCUNDEFINED}, + {"GUIEnter", EVENT_GUIENTER}, ++ {"GUIFailed", EVENT_GUIFAILED}, + {"InsertChange", EVENT_INSERTCHANGE}, + {"InsertEnter", EVENT_INSERTENTER}, + {"InsertLeave", EVENT_INSERTLEAVE}, +*** ../vim-7.0.071/src/gui.c Tue Jun 20 20:39:32 2006 +--- src/gui.c Tue Aug 29 10:12:32 2006 +*************** +*** 187,195 **** + #endif + + #ifdef FEAT_AUTOCMD +! /* If the GUI started successfully, trigger the GUIEnter event */ +! if (gui.in_use) +! apply_autocmds(EVENT_GUIENTER, NULL, NULL, FALSE, curbuf); + #endif + + --recursive; +--- 187,196 ---- + #endif + + #ifdef FEAT_AUTOCMD +! /* If the GUI started successfully, trigger the GUIEnter event, otherwise +! * the GUIFailed event. */ +! apply_autocmds(gui.in_use ? EVENT_GUIENTER : EVENT_GUIFAILED, +! NULL, NULL, FALSE, curbuf); + #endif + + --recursive; +*** ../vim-7.0.071/src/vim.h Fri Jun 23 16:33:41 2006 +--- src/vim.h Tue Aug 29 10:12:47 2006 +*************** +*** 1120,1125 **** +--- 1120,1126 ---- + EVENT_FOCUSGAINED, /* got the focus */ + EVENT_FOCUSLOST, /* lost the focus to another app */ + EVENT_GUIENTER, /* after starting the GUI */ ++ EVENT_GUIFAILED, /* after starting the GUI failed */ + EVENT_INSERTCHANGE, /* when changing Insert/Replace mode */ + EVENT_INSERTENTER, /* when entering Insert mode */ + EVENT_INSERTLEAVE, /* when leaving Insert mode */ +*** ../vim-7.0.071/src/version.c Tue Aug 29 18:01:39 2006 +--- src/version.c Tue Aug 29 18:15:13 2006 +*************** +*** 668,669 **** +--- 668,671 ---- + { /* Add new patch number below this line */ ++ /**/ ++ 72, + /**/ + +-- +hundred-and-one symptoms of being an internet addict: +269. You receive an e-mail from the wife of a deceased president, offering + to send you twenty million dollar, and you are not even surprised. + + /// Bram Moolenaar -- Bram@Moolenaar.net -- http://www.Moolenaar.net \\\ +/// sponsor Vim, vote for features -- http://www.Vim.org/sponsor/ \\\ +\\\ download, build and distribute -- http://www.A-A-P.org /// + \\\ help me help AIDS victims -- http://ICCF-Holland.org /// --- vim-7.0.orig/upstream/patches/7.0.101 +++ vim-7.0/upstream/patches/7.0.101 @@ -0,0 +1,89 @@ +To: vim-dev@vim.org +Subject: Patch 7.0.101 +Fcc: outbox +From: Bram Moolenaar +Mime-Version: 1.0 +Content-Type: text/plain; charset=ISO-8859-1 +Content-Transfer-Encoding: 8bit +------------ + +Patch 7.0.101 +Problem: When the "~/.vim/spell" directory does not exist "zg" may create + a wrong directory. "zw" doesn't work. +Solution: Use the directory of the file name instead of NameBuff. For "zw" + not only remove a good word but also add the word with "!". +Files: src/spell.c + + +*** ../vim-7.0.100/src/spell.c Mon Sep 11 21:37:27 2006 +--- src/spell.c Tue Sep 12 20:21:01 2006 +*************** +*** 9347,9366 **** + fclose(fd); + } + } +! else + { + fd = mch_fopen((char *)fname, "a"); + if (fd == NULL && new_spf) + { + /* We just initialized the 'spellfile' option and can't open the + * file. We may need to create the "spell" directory first. We + * already checked the runtime directory is writable in + * init_spellfile(). */ +! if (!dir_of_file_exists(fname)) + { + /* The directory doesn't exist. Try creating it and opening + * the file again. */ +! vim_mkdir(NameBuff, 0755); + fd = mch_fopen((char *)fname, "a"); + } + } +--- 9347,9373 ---- + fclose(fd); + } + } +! +! if (!undo) + { + fd = mch_fopen((char *)fname, "a"); + if (fd == NULL && new_spf) + { ++ char_u *p; ++ + /* We just initialized the 'spellfile' option and can't open the + * file. We may need to create the "spell" directory first. We + * already checked the runtime directory is writable in + * init_spellfile(). */ +! if (!dir_of_file_exists(fname) && (p = gettail_sep(fname)) != fname) + { ++ int c = *p; ++ + /* The directory doesn't exist. Try creating it and opening + * the file again. */ +! *p = NUL; +! vim_mkdir(fname, 0755); +! *p = c; + fd = mch_fopen((char *)fname, "a"); + } + } +*** ../vim-7.0.100/src/version.c Mon Sep 11 21:37:27 2006 +--- src/version.c Tue Sep 12 21:47:21 2006 +*************** +*** 668,669 **** +--- 668,671 ---- + { /* Add new patch number below this line */ ++ /**/ ++ 101, + /**/ + +-- +ARTHUR: Did you say shrubberies? +ROGER: Yes. Shrubberies are my trade. I am a shrubber. My name is Roger + the Shrubber. I arrange, design, and sell shrubberies. + "Monty Python and the Holy Grail" PYTHON (MONTY) PICTURES LTD + + /// Bram Moolenaar -- Bram@Moolenaar.net -- http://www.Moolenaar.net \\\ +/// sponsor Vim, vote for features -- http://www.Vim.org/sponsor/ \\\ +\\\ download, build and distribute -- http://www.A-A-P.org /// + \\\ help me help AIDS victims -- http://ICCF-Holland.org /// --- vim-7.0.orig/upstream/patches/7.0.120 +++ vim-7.0/upstream/patches/7.0.120 @@ -0,0 +1,64 @@ +To: vim-dev@vim.org +Subject: Patch 7.0.120 +Fcc: outbox +From: Bram Moolenaar +Mime-Version: 1.0 +Content-Type: text/plain; charset=ISO-8859-1 +Content-Transfer-Encoding: 8bit +------------ + +Patch 7.0.120 +Problem: Crash when using CTRL-R = at the command line and entering + "getreg('=')". (James Vega) +Solution: Avoid recursiveness of evaluating the = register. +Files: src/ops.c + + +*** ../vim-7.0.119/src/ops.c Sun Jul 23 22:37:29 2006 +--- src/ops.c Fri Oct 6 21:27:40 2006 +*************** +*** 770,775 **** +--- 770,776 ---- + { + char_u *expr_copy; + char_u *rv; ++ static int nested = 0; + + if (expr_line == NULL) + return NULL; +*************** +*** 780,786 **** +--- 781,794 ---- + if (expr_copy == NULL) + return NULL; + ++ /* When we are invoked recursively limit the evaluation to 10 levels. ++ * Then return the string as-is. */ ++ if (nested >= 10) ++ return expr_copy; ++ ++ ++nested; + rv = eval_to_string(expr_copy, NULL, TRUE); ++ --nested; + vim_free(expr_copy); + return rv; + } +*** ../vim-7.0.119/src/version.c Fri Oct 6 20:39:58 2006 +--- src/version.c Fri Oct 6 21:31:56 2006 +*************** +*** 668,669 **** +--- 668,671 ---- + { /* Add new patch number below this line */ ++ /**/ ++ 120, + /**/ + +-- +hundred-and-one symptoms of being an internet addict: +16. You step out of your room and realize that your parents have moved and + you don't have a clue when it happened. + + /// Bram Moolenaar -- Bram@Moolenaar.net -- http://www.Moolenaar.net \\\ +/// sponsor Vim, vote for features -- http://www.Vim.org/sponsor/ \\\ +\\\ download, build and distribute -- http://www.A-A-P.org /// + \\\ help me help AIDS victims -- http://ICCF-Holland.org /// --- vim-7.0.orig/upstream/patches/7.0.121 +++ vim-7.0/upstream/patches/7.0.121 @@ -0,0 +1,50 @@ +To: vim-dev@vim.org +Subject: Patch 7.0.121 +Fcc: outbox +From: Bram Moolenaar +Mime-Version: 1.0 +Content-Type: text/plain; charset=ISO-8859-1 +Content-Transfer-Encoding: 8bit +------------ + +Patch 7.0.121 +Problem: GUI: Dragging the last status line doesn't work when there is a + text tabline. (Markus Wolf) +Solution: Take the text tabline into account when deciding to start modeless + selection. +Files: src/gui.c + + +*** ../vim-7.0.120/src/gui.c Sun Sep 10 21:38:48 2006 +--- src/gui.c Sun Oct 8 12:47:04 2006 +*************** +*** 2873,2878 **** +--- 2873,2881 ---- + */ + if ((State == NORMAL || State == NORMAL_BUSY || (State & INSERT)) + && Y_2_ROW(y) >= topframe->fr_height ++ # ifdef FEAT_WINDOWS ++ + firstwin->w_winrow ++ # endif + && button != MOUSE_DRAG + # ifdef FEAT_MOUSESHAPE + && !drag_status_line +*** ../vim-7.0.120/src/version.c Fri Oct 6 23:33:22 2006 +--- src/version.c Sun Oct 8 13:55:58 2006 +*************** +*** 668,669 **** +--- 668,671 ---- + { /* Add new patch number below this line */ ++ /**/ ++ 121, + /**/ + +-- +If they don't keep on exercising their lips, he thought, their brains +start working. + -- Douglas Adams, "The Hitchhiker's Guide to the Galaxy" + + /// Bram Moolenaar -- Bram@Moolenaar.net -- http://www.Moolenaar.net \\\ +/// sponsor Vim, vote for features -- http://www.Vim.org/sponsor/ \\\ +\\\ download, build and distribute -- http://www.A-A-P.org /// + \\\ help me help AIDS victims -- http://ICCF-Holland.org /// --- vim-7.0.orig/upstream/patches/7.0.010 +++ vim-7.0/upstream/patches/7.0.010 @@ -0,0 +1,118 @@ +To: vim-dev@vim.org +Subject: Patch 7.0.010 +Fcc: outbox +From: Bram Moolenaar +Mime-Version: 1.0 +Content-Type: text/plain; charset=ISO-8859-1 +Content-Transfer-Encoding: 8bit +------------ + +Patch 7.0.010 +Problem: The spellfile plugin required typing login name and password. +Solution: Use "anonymous" and "vim7user" by default. No need to setup a + .netrc file. +Files: runtime/autoload/spellfile.vim + + +*** ../vim-7.0.009/runtime/autoload/spellfile.vim Wed May 10 15:22:54 2006 +--- runtime/autoload/spellfile.vim Wed May 10 17:55:15 2006 +*************** +*** 1,9 **** + " Vim script to download a missing spell file + " Maintainer: Bram Moolenaar +! " Last Change: 2006 Feb 01 + + if !exists('g:spellfile_URL') +! let g:spellfile_URL = 'ftp://ftp.vim.org/pub/vim/unstable/runtime/spell' + endif + let s:spellfile_URL = '' " Start with nothing so that s:donedict is reset. + +--- 1,9 ---- + " Vim script to download a missing spell file + " Maintainer: Bram Moolenaar +! " Last Change: 2006 May 10 + + if !exists('g:spellfile_URL') +! let g:spellfile_URL = 'ftp://ftp.vim.org/pub/vim/runtime/spell' + endif + let s:spellfile_URL = '' " Start with nothing so that s:donedict is reset. + +*************** +*** 61,73 **** + new + setlocal bin + echo 'Downloading ' . fname . '...' +! exe 'Nread ' g:spellfile_URL . '/' . fname + if getline(2) !~ 'VIMspell' + " Didn't work, perhaps there is an ASCII one. + g/^/d + let fname = a:lang . '.ascii.spl' + echo 'Could not find it, trying ' . fname . '...' +! exe 'Nread ' g:spellfile_URL . '/' . fname + if getline(2) !~ 'VIMspell' + echo 'Sorry, downloading failed' + bwipe! +--- 61,73 ---- + new + setlocal bin + echo 'Downloading ' . fname . '...' +! call spellfile#Nread(fname) + if getline(2) !~ 'VIMspell' + " Didn't work, perhaps there is an ASCII one. + g/^/d + let fname = a:lang . '.ascii.spl' + echo 'Could not find it, trying ' . fname . '...' +! call spellfile#Nread(fname) + if getline(2) !~ 'VIMspell' + echo 'Sorry, downloading failed' + bwipe! +*************** +*** 95,101 **** + g/^/d + let fname = substitute(fname, '\.spl$', '.sug', '') + echo 'Downloading ' . fname . '...' +! exe 'Nread ' g:spellfile_URL . '/' . fname + if getline(2) !~ 'VIMsug' + echo 'Sorry, downloading failed' + else +--- 95,101 ---- + g/^/d + let fname = substitute(fname, '\.spl$', '.sug', '') + echo 'Downloading ' . fname . '...' +! call spellfile#Nread(fname) + if getline(2) !~ 'VIMsug' + echo 'Sorry, downloading failed' + else +*************** +*** 108,111 **** +--- 108,118 ---- + + bwipe + endif ++ endfunc ++ ++ " Read "fname" from the ftp server. ++ function! spellfile#Nread(fname) ++ let machine = substitute(g:spellfile_URL, 'ftp://\([^/]*\).*', '\1', '') ++ let dir = substitute(g:spellfile_URL, 'ftp://[^/]*/\(.*\)', '\1', '') ++ exe 'Nread "' . machine . ' anonymous vim7user ' . dir . '/' . a:fname . '"' + endfunc +*** ../vim-7.0.009/src/version.c Wed May 10 17:51:22 2006 +--- src/version.c Wed May 10 17:53:53 2006 +*************** +*** 668,669 **** +--- 668,671 ---- + { /* Add new patch number below this line */ ++ /**/ ++ 10, + /**/ + +-- +I AM THANKFUL... +...for the mess to clean after a party because it means I have +been surrounded by friends. + + /// Bram Moolenaar -- Bram@Moolenaar.net -- http://www.Moolenaar.net \\\ +/// sponsor Vim, vote for features -- http://www.Vim.org/sponsor/ \\\ +\\\ download, build and distribute -- http://www.A-A-P.org /// + \\\ help me help AIDS victims -- http://ICCF-Holland.org /// --- vim-7.0.orig/upstream/patches/7.0.023 +++ vim-7.0/upstream/patches/7.0.023 @@ -0,0 +1,170 @@ +To: vim-dev@vim.org +Subject: Patch 7.0.023 +Fcc: outbox +From: Bram Moolenaar +Mime-Version: 1.0 +Content-Type: text/plain; charset=ISO-8859-1 +Content-Transfer-Encoding: 8bit +------------ + +Patch 7.0.023 +Problem: Crash when doing spell completion in an empty line and pressing + CTRL-E. +Solution: Check for a zero pointer. (James Vega) + Also handle a situation without a matching pattern better, report + "No matches" instead of remaining in undefined CTRL-X mode. And + get out of CTRL-X mode when typing a letter. +Files: src/edit.c + + +*** ../vim-7.0.022/src/edit.c Sat May 13 15:27:57 2006 +--- src/edit.c Thu Jun 22 16:44:01 2006 +*************** +*** 719,727 **** + #ifdef FEAT_INS_EXPAND + /* + * Special handling of keys while the popup menu is visible or wanted +! * and the cursor is still in the completed word. + */ +! if (compl_started && pum_wanted() && curwin->w_cursor.col >= compl_col) + { + /* BS: Delete one character from "compl_leader". */ + if ((c == K_BS || c == Ctrl_H) +--- 721,734 ---- + #ifdef FEAT_INS_EXPAND + /* + * Special handling of keys while the popup menu is visible or wanted +! * and the cursor is still in the completed word. Only when there is +! * a match, skip this when no matches were found. + */ +! if (compl_started +! && pum_wanted() +! && curwin->w_cursor.col >= compl_col +! && (compl_shown_match == NULL +! || compl_shown_match != compl_shown_match->cp_next)) + { + /* BS: Delete one character from "compl_leader". */ + if ((c == K_BS || c == Ctrl_H) +*************** +*** 3393,3408 **** + ptr = compl_leader; + else + ptr = compl_orig_text; +! p = compl_orig_text; +! for (temp = 0; p[temp] != NUL && p[temp] == ptr[temp]; ++temp) +! ; + #ifdef FEAT_MBYTE +! if (temp > 0) +! temp -= (*mb_head_off)(compl_orig_text, p + temp); + #endif +! for (p += temp; *p != NUL; mb_ptr_adv(p)) +! AppendCharToRedobuff(K_BS); +! AppendToRedobuffLit(ptr + temp, -1); + } + + #ifdef FEAT_CINDENT +--- 3401,3421 ---- + ptr = compl_leader; + else + ptr = compl_orig_text; +! if (compl_orig_text != NULL) +! { +! p = compl_orig_text; +! for (temp = 0; p[temp] != NUL && p[temp] == ptr[temp]; +! ++temp) +! ; + #ifdef FEAT_MBYTE +! if (temp > 0) +! temp -= (*mb_head_off)(compl_orig_text, p + temp); + #endif +! for (p += temp; *p != NUL; mb_ptr_adv(p)) +! AppendCharToRedobuff(K_BS); +! } +! if (ptr != NULL) +! AppendToRedobuffLit(ptr + temp, -1); + } + + #ifdef FEAT_CINDENT +*************** +*** 4650,4659 **** + (int)STRLEN(compl_pattern), curs_col); + if (compl_xp.xp_context == EXPAND_UNSUCCESSFUL + || compl_xp.xp_context == EXPAND_NOTHING) +! return FAIL; +! startcol = (int)(compl_xp.xp_pattern - compl_pattern); +! compl_col = startcol; +! compl_length = curs_col - startcol; + } + else if (ctrl_x_mode == CTRL_X_FUNCTION || ctrl_x_mode == CTRL_X_OMNI) + { +--- 4663,4680 ---- + (int)STRLEN(compl_pattern), curs_col); + if (compl_xp.xp_context == EXPAND_UNSUCCESSFUL + || compl_xp.xp_context == EXPAND_NOTHING) +! { +! compl_col = curs_col; +! compl_length = 0; +! vim_free(compl_pattern); +! compl_pattern = NULL; +! } +! else +! { +! startcol = (int)(compl_xp.xp_pattern - compl_pattern); +! compl_col = startcol; +! compl_length = curs_col - startcol; +! } + } + else if (ctrl_x_mode == CTRL_X_FUNCTION || ctrl_x_mode == CTRL_X_OMNI) + { +*************** +*** 4707,4717 **** + else + compl_col = spell_word_start(startcol); + if (compl_col >= (colnr_T)startcol) +! return FAIL; +! spell_expand_check_cap(compl_col); + /* Need to obtain "line" again, it may have become invalid. */ + line = ml_get(curwin->w_cursor.lnum); +- compl_length = (int)curs_col - compl_col; + compl_pattern = vim_strnsave(line + compl_col, compl_length); + if (compl_pattern == NULL) + #endif +--- 4728,4744 ---- + else + compl_col = spell_word_start(startcol); + if (compl_col >= (colnr_T)startcol) +! { +! compl_length = 0; +! compl_col = curs_col; +! } +! else +! { +! spell_expand_check_cap(compl_col); +! compl_length = (int)curs_col - compl_col; +! } + /* Need to obtain "line" again, it may have become invalid. */ + line = ml_get(curwin->w_cursor.lnum); + compl_pattern = vim_strnsave(line + compl_col, compl_length); + if (compl_pattern == NULL) + #endif +*** ../vim-7.0.022/src/version.c Tue Jun 20 21:08:02 2006 +--- src/version.c Thu Jun 22 16:34:42 2006 +*************** +*** 668,669 **** +--- 668,671 ---- + { /* Add new patch number below this line */ ++ /**/ ++ 23, + /**/ + +-- +BEDEVERE: Look! It's the old man from scene 24 - what's he Doing here? +ARTHUR: He is the keeper of the Bridge. He asks each traveler five + questions ... +GALAHAD: Three questions. + "Monty Python and the Holy Grail" PYTHON (MONTY) PICTURES LTD + + /// Bram Moolenaar -- Bram@Moolenaar.net -- http://www.Moolenaar.net \\\ +/// sponsor Vim, vote for features -- http://www.Vim.org/sponsor/ \\\ +\\\ download, build and distribute -- http://www.A-A-P.org /// + \\\ help me help AIDS victims -- http://ICCF-Holland.org /// --- vim-7.0.orig/upstream/patches/7.0.156 +++ vim-7.0/upstream/patches/7.0.156 @@ -0,0 +1,883 @@ +To: vim-dev@vim.org +Subject: Patch 7.0.156 +Fcc: outbox +From: Bram Moolenaar +Mime-Version: 1.0 +Content-Type: text/plain; charset=ISO-8859-1 +Content-Transfer-Encoding: 8bit +------------ + +Patch 7.0.156 (extra) +Problem: Vim doesn't compile for Amiga OS 4. +Solution: Various changes for Amiga OS4. (Peter Bengtsson) +Files: src/feature.h, src/mbyte.c, src/memfile.c, src/memline.c, + src/os_amiga.c, src/os_amiga.h, src/pty.c + + +*** ../vim-7.0.155/src/feature.h Thu Apr 27 01:54:09 2006 +--- src/feature.h Wed Nov 1 17:52:54 2006 +*************** +*** 1133,1139 **** + /* + * +ARP Amiga only. Use arp.library, DOS 2.0 is not required. + */ +! #ifndef NO_ARP + # define FEAT_ARP + #endif + +--- 1133,1139 ---- + /* + * +ARP Amiga only. Use arp.library, DOS 2.0 is not required. + */ +! #if !defined(NO_ARP) && !defined(__amigaos4__) + # define FEAT_ARP + #endif + +*** ../vim-7.0.155/src/mbyte.c Tue Aug 29 17:28:56 2006 +--- src/mbyte.c Wed Nov 1 17:52:54 2006 +*************** +*** 667,673 **** + * API */ + n = IsDBCSLeadByteEx(enc_dbcs, (BYTE)i) ? 2 : 1; + #else +! # ifdef MACOS + /* + * if mblen() is not available, character which MSB is turned on + * are treated as leading byte character. (note : This assumption +--- 667,673 ---- + * API */ + n = IsDBCSLeadByteEx(enc_dbcs, (BYTE)i) ? 2 : 1; + #else +! # if defined(MACOS) || defined(__amigaos4__) + /* + * if mblen() is not available, character which MSB is turned on + * are treated as leading byte character. (note : This assumption +*** ../vim-7.0.155/src/memfile.c Tue Sep 26 13:49:41 2006 +--- src/memfile.c Wed Nov 1 17:52:54 2006 +*************** +*** 655,661 **** + # endif + #endif + #ifdef AMIGA +! # ifdef __AROS__ + if (fsync(mfp->mf_fd) != 0) + status = FAIL; + # else +--- 655,661 ---- + # endif + #endif + #ifdef AMIGA +! # if defined(__AROS__) || defined(__amigaos4__) + if (fsync(mfp->mf_fd) != 0) + status = FAIL; + # else +*** ../vim-7.0.155/src/memline.c Tue Oct 10 21:56:37 2006 +--- src/memline.c Wed Nov 1 17:52:54 2006 +*************** +*** 55,64 **** + # include + #endif + +! #ifdef SASC + # include /* for Open() and Close() */ + #endif + + typedef struct block0 ZERO_BL; /* contents of the first block */ + typedef struct pointer_block PTR_BL; /* contents of a pointer block */ + typedef struct data_block DATA_BL; /* contents of a data block */ +--- 55,68 ---- + # include + #endif + +! #if defined(SASC) || defined(__amigaos4__) + # include /* for Open() and Close() */ + #endif + ++ #ifdef HAVE_ERRNO_H ++ # include ++ #endif ++ + typedef struct block0 ZERO_BL; /* contents of the first block */ + typedef struct pointer_block PTR_BL; /* contents of a pointer block */ + typedef struct data_block DATA_BL; /* contents of a data block */ +*************** +*** 4481,4487 **** + curchnk = buf->b_ml.ml_chunksize + curix; + + if (updtype == ML_CHNK_DELLINE) +! len *= -1; + curchnk->mlcs_totalsize += len; + if (updtype == ML_CHNK_ADDLINE) + { +--- 4485,4491 ---- + curchnk = buf->b_ml.ml_chunksize + curix; + + if (updtype == ML_CHNK_DELLINE) +! len = -len; + curchnk->mlcs_totalsize += len; + if (updtype == ML_CHNK_ADDLINE) + { +*** ../vim-7.0.155/src/os_amiga.c Thu Sep 14 21:36:35 2006 +--- src/os_amiga.c Wed Nov 1 18:09:46 2006 +*************** +*** 30,49 **** + # include + # include + # include +- # include + # include +- #else +- # include +- # include +- # include +- # include + #endif + + #include + + #include /* for 2.0 functions */ + #include + + #if defined(LATTICE) && !defined(SASC) && defined(FEAT_ARP) + # include + #endif +--- 30,60 ---- + # include + # include + # include + # include + #endif + ++ /* XXX These are included from os_amiga.h ++ #include ++ #include ++ #include ++ */ ++ + #include ++ #include + + #include /* for 2.0 functions */ + #include + ++ /* From version 4 of AmigaOS, several system structures must be allocated ++ * and freed using system functions. "struct AnchorPath" is one. ++ */ ++ #ifdef __amigaos4__ ++ # include ++ # define free_fib(x) FreeDosObject(DOS_FIB, x) ++ #else ++ # define free_fib(x) vim_free(fib) ++ #endif ++ + #if defined(LATTICE) && !defined(SASC) && defined(FEAT_ARP) + # include + #endif +*************** +*** 56,62 **** + #undef FALSE + #define FALSE (0) + +! #if !defined(AZTEC_C) && !defined(__AROS__) + static long dos_packet __ARGS((struct MsgPort *, long, long)); + #endif + static int lock2name __ARGS((BPTR lock, char_u *buf, long len)); +--- 67,75 ---- + #undef FALSE + #define FALSE (0) + +! #ifdef __amigaos4__ +! # define dos_packet(a, b, c) DoPkt(a, b, c, 0, 0, 0, 0) +! #elif !defined(AZTEC_C) && !defined(__AROS__) + static long dos_packet __ARGS((struct MsgPort *, long, long)); + #endif + static int lock2name __ARGS((BPTR lock, char_u *buf, long len)); +*************** +*** 68,74 **** +--- 81,89 ---- + static BPTR raw_out = (BPTR)NULL; + static int close_win = FALSE; /* set if Vim opened the window */ + ++ #ifndef __amigaos4__ /* Use autoopen for AmigaOS4 */ + struct IntuitionBase *IntuitionBase = NULL; ++ #endif + #ifdef FEAT_ARP + struct ArpBase *ArpBase = NULL; + #endif +*************** +*** 186,194 **** +--- 201,217 ---- + mch_avail_mem(special) + int special; + { ++ #ifdef __amigaos4__ ++ return (long_u)AvailMem(MEMF_ANY); ++ #else + return (long_u)AvailMem(special ? (long)MEMF_CHIP : (long)MEMF_ANY); ++ #endif + } + ++ /* ++ * Waits a specified amount of time, or until input arrives if ++ * ignoreinput is FALSE. ++ */ + void + mch_delay(msec, ignoreinput) + long msec; +*************** +*** 252,257 **** +--- 275,281 ---- + out_flush(); + + wb_window = NULL; ++ #ifndef __amigaos4__ + if ((IntuitionBase = (struct IntuitionBase *) + OpenLibrary((UBYTE *)intlibname, 0L)) == NULL) + { +*************** +*** 260,265 **** +--- 284,290 ---- + mch_errmsg("!?\n"); + mch_exit(3); + } ++ #endif + } + + #include +*************** +*** 284,290 **** + { + int i; + BPTR nilfh, fh; +! char_u buf1[20]; + char_u buf2[BUF2SIZE]; + static char_u *(constrings[3]) = {(char_u *)"con:0/0/662/210/", + (char_u *)"con:0/0/640/200/", +--- 309,315 ---- + { + int i; + BPTR nilfh, fh; +! char_u buf1[24]; + char_u buf2[BUF2SIZE]; + static char_u *(constrings[3]) = {(char_u *)"con:0/0/662/210/", + (char_u *)"con:0/0/640/200/", +*************** +*** 295,329 **** + char *av; + char_u *device = NULL; + int exitval = 4; + struct Library *DosBase; + int usewin = FALSE; + + /* + * check if we are running under DOS 2.0x or higher + */ + DosBase = OpenLibrary(DOS_LIBRARY, 37L); + if (DosBase != NULL) + /* if (((struct Library *)DOSBase)->lib_Version >= 37) */ + { + CloseLibrary(DosBase); +! #ifdef FEAT_ARP + dos2 = TRUE; +! #endif + } + else /* without arp functions we NEED 2.0 */ + { +! #ifndef FEAT_ARP + mch_errmsg(_("Need Amigados version 2.04 or later\n")); + exit(3); +! #else + /* need arp functions for dos 1.x */ + if (!(ArpBase = (struct ArpBase *) OpenLibrary((UBYTE *)ArpName, ArpVersion))) + { + fprintf(stderr, _("Need %s version %ld\n"), ArpName, ArpVersion); + exit(3); + } +! #endif + } + + /* + * scan argv[] for the "-f" and "-d" arguments +--- 320,358 ---- + char *av; + char_u *device = NULL; + int exitval = 4; ++ #ifndef __amigaos4__ + struct Library *DosBase; ++ #endif + int usewin = FALSE; + + /* + * check if we are running under DOS 2.0x or higher + */ ++ #ifndef __amigaos4__ + DosBase = OpenLibrary(DOS_LIBRARY, 37L); + if (DosBase != NULL) + /* if (((struct Library *)DOSBase)->lib_Version >= 37) */ + { + CloseLibrary(DosBase); +! # ifdef FEAT_ARP + dos2 = TRUE; +! # endif + } + else /* without arp functions we NEED 2.0 */ + { +! # ifndef FEAT_ARP + mch_errmsg(_("Need Amigados version 2.04 or later\n")); + exit(3); +! # else + /* need arp functions for dos 1.x */ + if (!(ArpBase = (struct ArpBase *) OpenLibrary((UBYTE *)ArpName, ArpVersion))) + { + fprintf(stderr, _("Need %s version %ld\n"), ArpName, ArpVersion); + exit(3); + } +! # endif + } ++ #endif /* __amigaos4__ */ + + /* + * scan argv[] for the "-f" and "-d" arguments +*************** +*** 398,405 **** +--- 427,441 ---- + /* + * Make a unique name for the temp file (which we will not delete!). + * Use a pointer on the stack (nobody else will be using it). ++ * Under AmigaOS4, this assumption might change in the future, so ++ * we use a pointer to the current task instead. This should be a ++ * shared structure and thus globally unique. + */ ++ #ifdef __amigaos4__ ++ sprintf((char *)buf1, "t:nc%p", FindTask(0)); ++ #else + sprintf((char *)buf1, "t:nc%ld", (long)buf1); ++ #endif + if ((fh = Open((UBYTE *)buf1, (long)MODE_NEWFILE)) == (BPTR)NULL) + { + mch_errmsg(_("Cannot create ")); +*************** +*** 513,519 **** + + /* + * fname_case(): Set the case of the file name, if it already exists. +! * This will cause the file name to remain exactly the same. + */ + /*ARGSUSED*/ + void +--- 549,556 ---- + + /* + * fname_case(): Set the case of the file name, if it already exists. +! * This will cause the file name to remain exactly the same +! * if the file system ignores, but preserves case. + */ + /*ARGSUSED*/ + void +*************** +*** 528,536 **** + if (fib != NULL) + { + flen = STRLEN(name); + if (flen == strlen(fib->fib_FileName)) /* safety check */ + mch_memmove(name, fib->fib_FileName, flen); +! vim_free(fib); + } + } + +--- 565,578 ---- + if (fib != NULL) + { + flen = STRLEN(name); ++ /* TODO: Check if this fix applies to AmigaOS < 4 too.*/ ++ #ifdef __amigaos4__ ++ if (fib->fib_DirEntryType == ST_ROOT) ++ strcat(fib->fib_FileName, ":"); ++ #endif + if (flen == strlen(fib->fib_FileName)) /* safety check */ + mch_memmove(name, fib->fib_FileName, flen); +! free_fib(fib); + } + } + +*************** +*** 548,560 **** + + if (fname == NULL) /* safety check */ + return NULL; +! fib = (struct FileInfoBlock *)malloc(sizeof(struct FileInfoBlock)); + if (fib != NULL) + { + flock = Lock((UBYTE *)fname, (long)ACCESS_READ); + if (flock == (BPTR)NULL || !Examine(flock, fib)) + { +! vim_free(fib); /* in case of an error the memory is freed here */ + fib = NULL; + } + if (flock) +--- 590,606 ---- + + if (fname == NULL) /* safety check */ + return NULL; +! #ifdef __amigaos4__ +! fib = AllocDosObject(DOS_FIB,0); +! #else +! fib = (struct FileInfoBlock *)alloc(sizeof(struct FileInfoBlock)); +! #endif + if (fib != NULL) + { + flock = Lock((UBYTE *)fname, (long)ACCESS_READ); + if (flock == (BPTR)NULL || !Examine(flock, fib)) + { +! free_fib(fib); /* in case of an error the memory is freed here */ + fib = NULL; + } + if (flock) +*************** +*** 613,618 **** +--- 659,665 ---- + char_u *s; + int len; + { ++ /* TODO: Implement this. */ + *s = NUL; + return FAIL; + } +*************** +*** 625,631 **** +--- 672,682 ---- + char_u *s; + int len; + { ++ #if defined(__amigaos4__) && defined(__CLIB2__) ++ gethostname(s, len); ++ #else + vim_strncpy(s, "Amiga", len - 1); ++ #endif + } + + /* +*************** +*** 634,640 **** +--- 685,698 ---- + long + mch_get_pid() + { ++ #ifdef __amigaos4__ ++ /* This is as close to a pid as we can come. We could use CLI numbers also, ++ * but then we would have two different types of process identifiers. ++ */ ++ return((long)FindTask(0)); ++ #else + return (long)0; ++ #endif + } + + /* +*************** +*** 746,752 **** + if (fib != NULL) + { + retval = fib->fib_Protection; +! vim_free(fib); + } + return retval; + } +--- 804,810 ---- + if (fib != NULL) + { + retval = fib->fib_Protection; +! free_fib(fib); + } + return retval; + } +*************** +*** 790,797 **** + fib = get_fib(name); + if (fib != NULL) + { + retval = ((fib->fib_DirEntryType >= 0) ? TRUE : FALSE); +! vim_free(fib); + } + return retval; + } +--- 848,859 ---- + fib = get_fib(name); + if (fib != NULL) + { ++ #ifdef __amigaos4__ ++ retval = (FIB_IS_DRAWER(fib)) ? TRUE : FALSE; ++ #else + retval = ((fib->fib_DirEntryType >= 0) ? TRUE : FALSE); +! #endif +! free_fib(fib); + } + return retval; + } +*************** +*** 912,918 **** + mch_settmode(tmode) + int tmode; + { +! #ifdef __AROS__ + if (!SetMode(raw_in, tmode == TMODE_RAW ? 1 : 0)) + #else + if (dos_packet(MP(raw_in), (long)ACTION_SCREEN_MODE, +--- 974,980 ---- + mch_settmode(tmode) + int tmode; + { +! #if defined(__AROS__) || defined(__amigaos4__) + if (!SetMode(raw_in, tmode == TMODE_RAW ? 1 : 0)) + #else + if (dos_packet(MP(raw_in), (long)ACTION_SCREEN_MODE, +*************** +*** 954,967 **** + mch_get_shellsize() + { + struct ConUnit *conUnit; + char id_a[sizeof(struct InfoData) + 3]; +! struct InfoData *id; + + if (!term_console) /* not an amiga window */ +! return FAIL; + + /* insure longword alignment */ + id = (struct InfoData *)(((long)id_a + 3L) & ~3L); + + /* + * Should make console aware of real window size, not the one we set. +--- 1016,1036 ---- + mch_get_shellsize() + { + struct ConUnit *conUnit; ++ #ifndef __amigaos4__ + char id_a[sizeof(struct InfoData) + 3]; +! #endif +! struct InfoData *id=0; + + if (!term_console) /* not an amiga window */ +! goto out; + + /* insure longword alignment */ ++ #ifdef __amigaos4__ ++ if(!(id = AllocDosObject(DOS_INFODATA, 0))) ++ goto out; ++ #else + id = (struct InfoData *)(((long)id_a + 3L) & ~3L); ++ #endif + + /* + * Should make console aware of real window size, not the one we set. +*************** +*** 983,989 **** + /* it's not an amiga window, maybe aux device */ + /* terminal type should be set */ + term_console = FALSE; +! return FAIL; + } + if (oldwindowtitle == NULL) + oldwindowtitle = (char_u *)wb_window->Title; +--- 1052,1058 ---- + /* it's not an amiga window, maybe aux device */ + /* terminal type should be set */ + term_console = FALSE; +! goto out; + } + if (oldwindowtitle == NULL) + oldwindowtitle = (char_u *)wb_window->Title; +*************** +*** 1006,1011 **** +--- 1075,1086 ---- + } + + return OK; ++ out: ++ #ifdef __amigaos4__ ++ FreeDosObject(DOS_INFODATA, id); /* Safe to pass NULL */ ++ #endif ++ ++ return FAIL; + } + + /* +*************** +*** 1046,1052 **** + OUT_STR_NF(tltoa((unsigned long)n)); + } + +! #if !defined(AZTEC_C) && !defined(__AROS__) + /* + * Sendpacket.c + * +--- 1121,1127 ---- + OUT_STR_NF(tltoa((unsigned long)n)); + } + +! #if !defined(AZTEC_C) && !defined(__AROS__) && !defined(__amigaos4__) + /* + * Sendpacket.c + * +*************** +*** 1371,1378 **** + * Use and abuse as you please. + */ + +! #define ANCHOR_BUF_SIZE (512) +! #define ANCHOR_SIZE (sizeof(struct AnchorPath) + ANCHOR_BUF_SIZE) + + int + mch_expandpath(gap, pat, flags) +--- 1446,1457 ---- + * Use and abuse as you please. + */ + +! #ifdef __amigaos4__ +! # define ANCHOR_BUF_SIZE 1024 +! #else +! # define ANCHOR_BUF_SIZE (512) +! # define ANCHOR_SIZE (sizeof(struct AnchorPath) + ANCHOR_BUF_SIZE) +! #endif + + int + mch_expandpath(gap, pat, flags) +*************** +*** 1385,1403 **** + char_u *starbuf, *sp, *dp; + int start_len; + int matches; + + start_len = gap->ga_len; + + /* Get our AnchorBase */ + Anchor = (struct AnchorPath *)alloc_clear((unsigned)ANCHOR_SIZE); + if (Anchor == NULL) + return 0; + + Anchor->ap_Strlen = ANCHOR_BUF_SIZE; /* ap_Length not supported anymore */ +! #ifdef APF_DODOT + Anchor->ap_Flags = APF_DODOT | APF_DOWILD; /* allow '.' for current dir */ +! #else + Anchor->ap_Flags = APF_DoDot | APF_DoWild; /* allow '.' for current dir */ + #endif + + #ifdef FEAT_ARP +--- 1464,1495 ---- + char_u *starbuf, *sp, *dp; + int start_len; + int matches; ++ #ifdef __amigaos4__ ++ struct TagItem AnchorTags[] = { ++ {ADO_Strlen, ANCHOR_BUF_SIZE}, ++ {ADO_Flags, APF_DODOT|APF_DOWILD|APF_MultiAssigns}, ++ {TAG_DONE, 0L} ++ }; ++ #endif + + start_len = gap->ga_len; + + /* Get our AnchorBase */ ++ #ifdef __amigaos4__ ++ Anchor = AllocDosObject(DOS_ANCHORPATH, AnchorTags); ++ #else + Anchor = (struct AnchorPath *)alloc_clear((unsigned)ANCHOR_SIZE); ++ #endif + if (Anchor == NULL) + return 0; + ++ #ifndef __amigaos4__ + Anchor->ap_Strlen = ANCHOR_BUF_SIZE; /* ap_Length not supported anymore */ +! # ifdef APF_DODOT + Anchor->ap_Flags = APF_DODOT | APF_DOWILD; /* allow '.' for current dir */ +! # else + Anchor->ap_Flags = APF_DoDot | APF_DoWild; /* allow '.' for current dir */ ++ # endif + #endif + + #ifdef FEAT_ARP +*************** +*** 1432,1438 **** +--- 1524,1534 ---- + */ + while (Result == 0) + { ++ #ifdef __amigaos4__ ++ addfile(gap, (char_u *)Anchor->ap_Buffer, flags); ++ #else + addfile(gap, (char_u *)Anchor->ap_Buf, flags); ++ #endif + #ifdef FEAT_ARP + if (dos2) + #endif +*************** +*** 1469,1475 **** +--- 1565,1575 ---- + #endif + + Return: ++ #ifdef __amigaos4__ ++ FreeDosObject(DOS_ANCHORPATH, Anchor); ++ #else + vim_free(Anchor); ++ #endif + + return matches; + } +*** ../vim-7.0.155/src/os_amiga.h Sun Jun 13 22:09:36 2004 +--- src/os_amiga.h Wed Nov 1 18:03:32 2006 +*************** +*** 17,25 **** + #define HAVE_AVAIL_MEM + + #ifndef HAVE_CONFIG_H +! # ifdef AZTEC_C + # define HAVE_STAT_H + # endif + # define HAVE_STDLIB_H + # define HAVE_STRING_H + # define HAVE_FCNTL_H +--- 17,28 ---- + #define HAVE_AVAIL_MEM + + #ifndef HAVE_CONFIG_H +! # if defined(AZTEC_C) || defined(__amigaos4__) + # define HAVE_STAT_H + # endif ++ # ifdef __amigaos4__ ++ # define HAVE_STDARG_H ++ # endif + # define HAVE_STDLIB_H + # define HAVE_STRING_H + # define HAVE_FCNTL_H +*************** +*** 34,48 **** + # define HAVE_DATE_TIME + # endif + +! #define DFLT_ERRORFILE "AztecC.Err" +! #define DFLT_RUNTIMEPATH "home:vimfiles,$VIM/vimfiles,$VIMRUNTIME,$VIM/vimfiles/after,home:vimfiles/after" + +! #define BASENAMELEN 26 /* Amiga */ + +! #define TEMPNAME "t:v?XXXXXX" +! #define TEMPNAMELEN 12 + +! #endif /* HAVE_CONFIG_H */ + + #include + #include +--- 37,60 ---- + # define HAVE_DATE_TIME + # endif + +! #endif /* HAVE_CONFIG_H */ + +! #ifndef DFLT_ERRORFILE +! # define DFLT_ERRORFILE "AztecC.Err" /* Should this change? */ +! #endif + +! #ifndef DFLT_RUNTIMEPATH +! # define DFLT_RUNTIMEPATH "home:vimfiles,$VIM/vimfiles,$VIMRUNTIME,$VIM/vimfiles/after,home:vimfiles/after" +! #endif + +! #ifndef BASENAMELEN +! # define BASENAMELEN 26 /* Amiga */ +! #endif +! +! #ifndef TEMPNAME +! # define TEMPNAME "t:v?XXXXXX" +! # define TEMPNAMELEN 12 +! #endif + + #include + #include +*************** +*** 155,163 **** + #endif + + #ifdef FEAT_VIMINFO +! #ifndef VIMINFO_FILE +! # define VIMINFO_FILE "s:.viminfo" +! #endif + #endif /* FEAT_VIMINFO */ + + #ifndef EXRC_FILE +--- 167,175 ---- + #endif + + #ifdef FEAT_VIMINFO +! # ifndef VIMINFO_FILE +! # define VIMINFO_FILE "s:.viminfo" +! # endif + #endif /* FEAT_VIMINFO */ + + #ifndef EXRC_FILE +*** ../vim-7.0.155/src/pty.c Sun Jun 13 22:04:27 2004 +--- src/pty.c Wed Nov 1 17:53:01 2006 +*************** +*** 51,57 **** + # include + #endif + +! #if HAVE_SYS_IOCTL_H + # include + #endif + +--- 51,57 ---- + # include + #endif + +! #ifdef HAVE_SYS_IOCTL_H + # include + #endif + +*************** +*** 69,82 **** + # endif + #endif + +! #if HAVE_UNISTD_H + # include + #endif + + #if HAVE_TERMIO_H + # include + #else +! # if HAVE_TERMIOS_H + # include + # endif + #endif +--- 69,82 ---- + # endif + #endif + +! #ifdef HAVE_UNISTD_H + # include + #endif + + #if HAVE_TERMIO_H + # include + #else +! # ifdef HAVE_TERMIOS_H + # include + # endif + #endif +*** ../vim-7.0.155/src/version.c Wed Nov 1 15:31:02 2006 +--- src/version.c Wed Nov 1 18:04:17 2006 +*************** +*** 668,669 **** +--- 668,671 ---- + { /* Add new patch number below this line */ ++ /**/ ++ 156, + /**/ + +-- +hundred-and-one symptoms of being an internet addict: +139. You down your lunch in five minutes, at your desk, so you can + spend the rest of the hour surfing the Net. + + /// Bram Moolenaar -- Bram@Moolenaar.net -- http://www.Moolenaar.net \\\ +/// sponsor Vim, vote for features -- http://www.Vim.org/sponsor/ \\\ +\\\ download, build and distribute -- http://www.A-A-P.org /// + \\\ help me help AIDS victims -- http://ICCF-Holland.org /// --- vim-7.0.orig/upstream/patches/7.0.141 +++ vim-7.0/upstream/patches/7.0.141 @@ -0,0 +1,210 @@ +To: vim-dev@vim.org +Subject: Patch 7.0.141 +Fcc: outbox +From: Bram Moolenaar +Mime-Version: 1.0 +Content-Type: text/plain; charset=ISO-8859-1 +Content-Transfer-Encoding: 8bit +------------ + +Patch 7.0.141 +Problem: When pasting a while line on the command line an extra CR is added + literally. +Solution: Don't add the trailing CR when pasting with the mouse. +Files: src/ex_getln.c, src/proto/ops.pro, src/ops.c + + +*** ../vim-7.0.140/src/ex_getln.c Thu Sep 14 11:27:12 2006 +--- src/ex_getln.c Sun Oct 15 16:17:20 2006 +*************** +*** 86,92 **** + static void draw_cmdline __ARGS((int start, int len)); + static void save_cmdline __ARGS((struct cmdline_info *ccp)); + static void restore_cmdline __ARGS((struct cmdline_info *ccp)); +! static int cmdline_paste __ARGS((int regname, int literally)); + #if defined(FEAT_XIM) && defined(FEAT_GUI_GTK) + static void redrawcmd_preedit __ARGS((void)); + #endif +--- 86,92 ---- + static void draw_cmdline __ARGS((int start, int len)); + static void save_cmdline __ARGS((struct cmdline_info *ccp)); + static void restore_cmdline __ARGS((struct cmdline_info *ccp)); +! static int cmdline_paste __ARGS((int regname, int literally, int remcr)); + #if defined(FEAT_XIM) && defined(FEAT_GUI_GTK) + static void redrawcmd_preedit __ARGS((void)); + #endif +*************** +*** 1116,1122 **** + #endif + if (c != ESC) /* use ESC to cancel inserting register */ + { +! cmdline_paste(c, i == Ctrl_R); + + #ifdef FEAT_EVAL + /* When there was a serious error abort getting the +--- 1116,1122 ---- + #endif + if (c != ESC) /* use ESC to cancel inserting register */ + { +! cmdline_paste(c, i == Ctrl_R, FALSE); + + #ifdef FEAT_EVAL + /* When there was a serious error abort getting the +*************** +*** 1231,1246 **** + goto cmdline_not_changed; /* Ignore mouse */ + # ifdef FEAT_CLIPBOARD + if (clip_star.available) +! cmdline_paste('*', TRUE); + else + # endif +! cmdline_paste(0, TRUE); + redrawcmd(); + goto cmdline_changed; + + # ifdef FEAT_DND + case K_DROP: +! cmdline_paste('~', TRUE); + redrawcmd(); + goto cmdline_changed; + # endif +--- 1231,1246 ---- + goto cmdline_not_changed; /* Ignore mouse */ + # ifdef FEAT_CLIPBOARD + if (clip_star.available) +! cmdline_paste('*', TRUE, TRUE); + else + # endif +! cmdline_paste(0, TRUE, TRUE); + redrawcmd(); + goto cmdline_changed; + + # ifdef FEAT_DND + case K_DROP: +! cmdline_paste('~', TRUE, FALSE); + redrawcmd(); + goto cmdline_changed; + # endif +*************** +*** 2890,2898 **** + * return FAIL for failure, OK otherwise + */ + static int +! cmdline_paste(regname, literally) + int regname; + int literally; /* Insert text literally instead of "as typed" */ + { + long i; + char_u *arg; +--- 2890,2899 ---- + * return FAIL for failure, OK otherwise + */ + static int +! cmdline_paste(regname, literally, remcr) + int regname; + int literally; /* Insert text literally instead of "as typed" */ ++ int remcr; /* remove trailing CR */ + { + long i; + char_u *arg; +*************** +*** 2968,2974 **** + return OK; + } + +! return cmdline_paste_reg(regname, literally); + } + + /* +--- 2969,2975 ---- + return OK; + } + +! return cmdline_paste_reg(regname, literally, remcr); + } + + /* +*** ../vim-7.0.140/src/proto/ops.pro Sun Apr 30 20:25:07 2006 +--- src/proto/ops.pro Tue Oct 17 16:24:08 2006 +*************** +*** 20,26 **** + extern int do_execreg __ARGS((int regname, int colon, int addcr)); + extern int insert_reg __ARGS((int regname, int literally)); + extern int get_spec_reg __ARGS((int regname, char_u **argp, int *allocated, int errmsg)); +! extern int cmdline_paste_reg __ARGS((int regname, int literally)); + extern void adjust_clip_reg __ARGS((int *rp)); + extern int op_delete __ARGS((oparg_T *oap)); + extern int op_replace __ARGS((oparg_T *oap, int c)); +--- 20,26 ---- + extern int do_execreg __ARGS((int regname, int colon, int addcr)); + extern int insert_reg __ARGS((int regname, int literally)); + extern int get_spec_reg __ARGS((int regname, char_u **argp, int *allocated, int errmsg)); +! extern int cmdline_paste_reg __ARGS((int regname, int literally, int remcr)); + extern void adjust_clip_reg __ARGS((int *rp)); + extern int op_delete __ARGS((oparg_T *oap)); + extern int op_replace __ARGS((oparg_T *oap, int c)); +*** ../vim-7.0.140/src/ops.c Fri Oct 6 23:33:22 2006 +--- src/ops.c Sun Oct 15 16:43:54 2006 +*************** +*** 1480,1488 **** + * return FAIL for failure, OK otherwise + */ + int +! cmdline_paste_reg(regname, literally) + int regname; + int literally; /* Insert text literally instead of "as typed" */ + { + long i; + +--- 1481,1490 ---- + * return FAIL for failure, OK otherwise + */ + int +! cmdline_paste_reg(regname, literally, remcr) + int regname; + int literally; /* Insert text literally instead of "as typed" */ ++ int remcr; /* don't add trailing CR */ + { + long i; + +*************** +*** 1494,1501 **** + { + cmdline_paste_str(y_current->y_array[i], literally); + +! /* insert ^M between lines and after last line if type is MLINE */ +! if (y_current->y_type == MLINE || i < y_current->y_size - 1) + cmdline_paste_str((char_u *)"\r", literally); + + /* Check for CTRL-C, in case someone tries to paste a few thousand +--- 1496,1508 ---- + { + cmdline_paste_str(y_current->y_array[i], literally); + +! /* Insert ^M between lines and after last line if type is MLINE. +! * Don't do this when "remcr" is TRUE and the next line is empty. */ +! if (y_current->y_type == MLINE +! || (i < y_current->y_size - 1 +! && !(remcr +! && i == y_current->y_size - 2 +! && *y_current->y_array[i + 1] == NUL))) + cmdline_paste_str((char_u *)"\r", literally); + + /* Check for CTRL-C, in case someone tries to paste a few thousand +*** ../vim-7.0.140/src/version.c Tue Oct 17 15:17:41 2006 +--- src/version.c Tue Oct 17 16:22:55 2006 +*************** +*** 668,669 **** +--- 668,671 ---- + { /* Add new patch number below this line */ ++ /**/ ++ 141, + /**/ + +-- +ERROR 047: Keyboard not found. Press RETURN to continue. + + /// Bram Moolenaar -- Bram@Moolenaar.net -- http://www.Moolenaar.net \\\ +/// sponsor Vim, vote for features -- http://www.Vim.org/sponsor/ \\\ +\\\ download, build and distribute -- http://www.A-A-P.org /// + \\\ help me help AIDS victims -- http://ICCF-Holland.org /// --- vim-7.0.orig/upstream/patches/7.0.014 +++ vim-7.0/upstream/patches/7.0.014 @@ -0,0 +1,189 @@ +To: vim-dev@vim.org +Subject: Patch 7.0.014 +Fcc: outbox +From: Bram Moolenaar +Mime-Version: 1.0 +Content-Type: text/plain; charset=ISO-8859-1 +Content-Transfer-Encoding: 8bit +------------ + +Patch 7.0.014 +Problem: Compiling gui_xmebw.c fails on Dec Alpha Tru64. (Rolfe) +Solution: Disable some code for Motif 1.2 and older. +Files: src/gui_xmebw.c + + +*** ../vim-7.0.013/src/gui_xmebw.c Wed May 10 15:22:49 2006 +--- src/gui_xmebw.c Thu May 11 19:09:32 2006 +*************** +*** 480,486 **** + || (eb->core.height <= 2 * eb->primitive.highlight_thickness)) + return; + +! #ifndef LESSTIF_VERSION + { + XmDisplay dpy; + +--- 480,486 ---- + || (eb->core.height <= 2 * eb->primitive.highlight_thickness)) + return; + +! #if !defined(LESSTIF_VERSION) && (XmVersion > 1002) + { + XmDisplay dpy; + +*************** +*** 641,647 **** + GC tmp_gc = NULL; + Boolean replaceGC = False; + Boolean deadjusted = False; +! #ifndef LESSTIF_VERSION + XmDisplay dpy = (XmDisplay)XmGetXmDisplay(XtDisplay(eb)); + Boolean etched_in = dpy->display.enable_etched_in_menu; + #else +--- 641,647 ---- + GC tmp_gc = NULL; + Boolean replaceGC = False; + Boolean deadjusted = False; +! #if !defined(LESSTIF_VERSION) && (XmVersion > 1002) + XmDisplay dpy = (XmDisplay)XmGetXmDisplay(XtDisplay(eb)); + Boolean etched_in = dpy->display.enable_etched_in_menu; + #else +*************** +*** 726,732 **** + if ((((ShellWidget) XtParent(XtParent(eb)))->shell.popped_up) + && _XmGetInDragMode((Widget) eb)) + { +! #ifndef LESSTIF_VERSION + XmDisplay dpy = (XmDisplay) XmGetXmDisplay(XtDisplay(wid)); + Boolean etched_in = dpy->display.enable_etched_in_menu; + #else +--- 726,732 ---- + if ((((ShellWidget) XtParent(XtParent(eb)))->shell.popped_up) + && _XmGetInDragMode((Widget) eb)) + { +! #if !defined(LESSTIF_VERSION) && (XmVersion > 1002) + XmDisplay dpy = (XmDisplay) XmGetXmDisplay(XtDisplay(wid)); + Boolean etched_in = dpy->display.enable_etched_in_menu; + #else +*************** +*** 810,816 **** + + if (Lab_IsMenupane(eb)) + { +! #ifndef LESSTIF_VERSION + XmDisplay dpy = (XmDisplay) XmGetXmDisplay(XtDisplay(wid)); + Boolean etched_in = dpy->display.enable_etched_in_menu; + #else +--- 810,816 ---- + + if (Lab_IsMenupane(eb)) + { +! #if !defined(LESSTIF_VERSION) && (XmVersion > 1002) + XmDisplay dpy = (XmDisplay) XmGetXmDisplay(XtDisplay(wid)); + Boolean etched_in = dpy->display.enable_etched_in_menu; + #else +*************** +*** 1150,1156 **** + Redisplay(Widget w, XEvent *event, Region region) + { + XmEnhancedButtonWidget eb = (XmEnhancedButtonWidget) w; +! #ifndef LESSTIF_VERSION + XmDisplay dpy; + XtEnum default_button_emphasis; + #endif +--- 1150,1156 ---- + Redisplay(Widget w, XEvent *event, Region region) + { + XmEnhancedButtonWidget eb = (XmEnhancedButtonWidget) w; +! #if !defined(LESSTIF_VERSION) && (XmVersion > 1002) + XmDisplay dpy; + XtEnum default_button_emphasis; + #endif +*************** +*** 1162,1168 **** + if (!XtIsRealized((Widget)eb)) + return; + +! #ifndef LESSTIF_VERSION + dpy = (XmDisplay)XmGetXmDisplay(XtDisplay(eb)); + default_button_emphasis = dpy->display.default_button_emphasis; + #endif +--- 1162,1168 ---- + if (!XtIsRealized((Widget)eb)) + return; + +! #if !defined(LESSTIF_VERSION) && (XmVersion > 1002) + dpy = (XmDisplay)XmGetXmDisplay(XtDisplay(eb)); + default_button_emphasis = dpy->display.default_button_emphasis; + #endif +*************** +*** 1241,1247 **** + { + int adjust = 0; + +! #ifndef LESSTIF_VERSION + /* + * NOTE: PushButton has two types of shadows: primitive-shadow and + * default-button-shadow. If pushbutton is in a menu only primitive +--- 1241,1247 ---- + { + int adjust = 0; + +! #if !defined(LESSTIF_VERSION) && (XmVersion > 1002) + /* + * NOTE: PushButton has two types of shadows: primitive-shadow and + * default-button-shadow. If pushbutton is in a menu only primitive +*************** +*** 1289,1295 **** + adjust, adjust, rectwidth, rectheight, borderwidth); + } + +! #ifndef LESSTIF_VERSION + switch (default_button_emphasis) + { + case XmINTERNAL_HIGHLIGHT: +--- 1289,1295 ---- + adjust, adjust, rectwidth, rectheight, borderwidth); + } + +! #if !defined(LESSTIF_VERSION) && (XmVersion > 1002) + switch (default_button_emphasis) + { + case XmINTERNAL_HIGHLIGHT: +*************** +*** 1365,1371 **** + default_button_shadow_thickness = + eb->pushbutton.default_button_shadow_thickness; + +! #ifndef LESSTIF_VERSION + /* + * Compute location of bounding box to contain the + * defaultButtonShadow. +--- 1365,1371 ---- + default_button_shadow_thickness = + eb->pushbutton.default_button_shadow_thickness; + +! #if !defined(LESSTIF_VERSION) && (XmVersion > 1002) + /* + * Compute location of bounding box to contain the + * defaultButtonShadow. +*** ../vim-7.0.013/src/version.c Fri May 12 19:10:03 2006 +--- src/version.c Fri May 12 19:23:12 2006 +*************** +*** 668,669 **** +--- 668,671 ---- + { /* Add new patch number below this line */ ++ /**/ ++ 14, + /**/ + +-- +hundred-and-one symptoms of being an internet addict: +126. You brag to all of your friends about your date Saturday night...but + you don't tell them it was only in a chat room. + + /// Bram Moolenaar -- Bram@Moolenaar.net -- http://www.Moolenaar.net \\\ +/// sponsor Vim, vote for features -- http://www.Vim.org/sponsor/ \\\ +\\\ download, build and distribute -- http://www.A-A-P.org /// + \\\ help me help AIDS victims -- http://ICCF-Holland.org /// --- vim-7.0.orig/upstream/patches/7.0.073 +++ vim-7.0/upstream/patches/7.0.073 @@ -0,0 +1,50 @@ +To: vim-dev@vim.org +Subject: Patch 7.0.073 +Fcc: outbox +From: Bram Moolenaar +Mime-Version: 1.0 +Content-Type: text/plain; charset=ISO-8859-1 +Content-Transfer-Encoding: 8bit +------------ + +Patch 7.0.073 +Problem: Insert mode completion: Typing sometimes selects the original + text instead of keeping what was typed. (Justin Constantino) +Solution: Don't let select the original text if there is no popup menu. +Files: src/edit.c + + +*** ../vim-7.0.072/src/edit.c Tue Aug 29 17:28:56 2006 +--- src/edit.c Tue Aug 29 17:40:06 2006 +*************** +*** 3097,3102 **** +--- 3097,3106 ---- + + /* Show the popup menu with a different set of matches. */ + ins_compl_show_pum(); ++ ++ /* Don't let Enter select the original text when there is no popup menu. */ ++ if (compl_match_array == NULL) ++ compl_enter_selects = FALSE; + } + + /* +*** ../vim-7.0.072/src/version.c Tue Aug 29 18:16:37 2006 +--- src/version.c Tue Aug 29 18:35:33 2006 +*************** +*** 668,669 **** +--- 668,671 ---- + { /* Add new patch number below this line */ ++ /**/ ++ 73, + /**/ + +-- +hundred-and-one symptoms of being an internet addict: +269. You wonder how you can make your dustbin produce Sesame Street's + Oscar's the Garbage Monster song when you empty it. + + /// Bram Moolenaar -- Bram@Moolenaar.net -- http://www.Moolenaar.net \\\ +/// sponsor Vim, vote for features -- http://www.Vim.org/sponsor/ \\\ +\\\ download, build and distribute -- http://www.A-A-P.org /// + \\\ help me help AIDS victims -- http://ICCF-Holland.org /// --- vim-7.0.orig/upstream/patches/7.0.033 +++ vim-7.0/upstream/patches/7.0.033 @@ -0,0 +1,69 @@ +To: vim-dev@vim.org +Subject: Patch 7.0.033 +Fcc: outbox +From: Bram Moolenaar +Mime-Version: 1.0 +Content-Type: text/plain; charset=ISO-8859-1 +Content-Transfer-Encoding: 8bit +------------ + +Patch 7.0.033 +Problem: When pasting text, with the menu or CTRL-V, autoindent is removed. +Solution: Use "x" to avoid indent to be removed. (Benji Fisher) +Files: runtime/autoload/paste.vim + + +*** ../vim-7.0.032/runtime/autoload/paste.vim Fri Apr 21 23:57:39 2006 +--- runtime/autoload/paste.vim Fri Jun 23 17:18:48 2006 +*************** +*** 1,6 **** + " Vim support file to help with paste mappings and menus + " Maintainer: Bram Moolenaar +! " Last Change: 2006 Apr 21 + + " Define the string to use for items that are present both in Edit, Popup and + " Toolbar menu. Also used in mswin.vim and macmap.vim. +--- 1,6 ---- + " Vim support file to help with paste mappings and menus + " Maintainer: Bram Moolenaar +! " Last Change: 2006 Jun 23 + + " Define the string to use for items that are present both in Edit, Popup and + " Toolbar menu. Also used in mswin.vim and macmap.vim. +*************** +*** 12,18 **** + if has("virtualedit") + let paste#paste_cmd = {'n': ":call paste#Paste()"} + let paste#paste_cmd['v'] = '"-c' . paste#paste_cmd['n'] +! let paste#paste_cmd['i'] = '' . paste#paste_cmd['n'] . 'gi' + + func! paste#Paste() + let ove = &ve +--- 12,18 ---- + if has("virtualedit") + let paste#paste_cmd = {'n': ":call paste#Paste()"} + let paste#paste_cmd['v'] = '"-c' . paste#paste_cmd['n'] +! let paste#paste_cmd['i'] = 'x' . paste#paste_cmd['n'] . 'gi' + + func! paste#Paste() + let ove = &ve +*** ../vim-7.0.032/src/version.c Fri Jun 23 16:44:32 2006 +--- src/version.c Fri Jun 23 17:18:56 2006 +*************** +*** 668,669 **** +--- 668,671 ---- + { /* Add new patch number below this line */ ++ /**/ ++ 33, + /**/ + +-- +Yesterday, all my deadlines seemed so far away +now it looks as though it's freeze in four days +oh I believe in cvs.. + [ CVS log "Beatles style" for FreeBSD ports/INDEX, Satoshi Asami ] + + /// Bram Moolenaar -- Bram@Moolenaar.net -- http://www.Moolenaar.net \\\ +/// sponsor Vim, vote for features -- http://www.Vim.org/sponsor/ \\\ +\\\ download, build and distribute -- http://www.A-A-P.org /// + \\\ help me help AIDS victims -- http://ICCF-Holland.org /// --- vim-7.0.orig/upstream/patches/7.0.154 +++ vim-7.0/upstream/patches/7.0.154 @@ -0,0 +1,65 @@ +To: vim-dev@vim.org +Subject: Patch 7.0.154 +Fcc: outbox +From: Bram Moolenaar +Mime-Version: 1.0 +Content-Type: text/plain; charset=ISO-8859-1 +Content-Transfer-Encoding: 8bit +------------ + +Patch 7.0.154 +Problem: When 'foldnextmax' is negative Vim can hang. (James Vega) +Solution: Avoid the fold level becoming negative. +Files: src/fold.c, src/syntax.c + + +*** ../vim-7.0.153/src/fold.c Sun Apr 23 00:31:04 2006 +--- src/fold.c Sun Oct 29 20:23:21 2006 +*************** +*** 2971,2977 **** +--- 2971,2981 ---- + else + flp->lvl = get_indent_buf(buf, lnum) / buf->b_p_sw; + if (flp->lvl > flp->wp->w_p_fdn) ++ { + flp->lvl = flp->wp->w_p_fdn; ++ if (flp->lvl < 0) ++ flp->lvl = 0; ++ } + } + + /* foldlevelDiff() {{{2 */ +*** ../vim-7.0.153/src/syntax.c Tue Oct 3 17:04:21 2006 +--- src/syntax.c Sun Oct 29 20:21:27 2006 +*************** +*** 6072,6078 **** +--- 6072,6082 ---- + ++level; + } + if (level > wp->w_p_fdn) ++ { + level = wp->w_p_fdn; ++ if (level < 0) ++ level = 0; ++ } + return level; + } + #endif +*** ../vim-7.0.153/src/version.c Mon Oct 30 22:31:30 2006 +--- src/version.c Wed Nov 1 12:41:14 2006 +*************** +*** 668,669 **** +--- 668,671 ---- + { /* Add new patch number below this line */ ++ /**/ ++ 154, + /**/ + +-- +hundred-and-one symptoms of being an internet addict: +134. You consider bandwidth to be more important than carats. + + /// Bram Moolenaar -- Bram@Moolenaar.net -- http://www.Moolenaar.net \\\ +/// sponsor Vim, vote for features -- http://www.Vim.org/sponsor/ \\\ +\\\ download, build and distribute -- http://www.A-A-P.org /// + \\\ help me help AIDS victims -- http://ICCF-Holland.org /// --- vim-7.0.orig/upstream/patches/7.0.091 +++ vim-7.0/upstream/patches/7.0.091 @@ -0,0 +1,52 @@ +To: vim-dev@vim.org +Subject: Patch 7.0.091 +Fcc: outbox +From: Bram Moolenaar +Mime-Version: 1.0 +Content-Type: text/plain; charset=ISO-8859-1 +Content-Transfer-Encoding: 8bit +------------ + +Patch 7.0.091 +Problem: Using winrestview() while 'showcmd' is set causes the cursor to be + displayed in the wrong position. (Yakov Lerner) +Solution: Set the window topline properly. +Files: src/eval.c + + +*** ../vim-7.0.090/src/eval.c Tue Sep 5 12:57:14 2006 +--- src/eval.c Tue Sep 5 21:21:37 2006 +*************** +*** 16225,16231 **** + curwin->w_curswant = get_dict_number(dict, (char_u *)"curswant"); + curwin->w_set_curswant = FALSE; + +! curwin->w_topline = get_dict_number(dict, (char_u *)"topline"); + #ifdef FEAT_DIFF + curwin->w_topfill = get_dict_number(dict, (char_u *)"topfill"); + #endif +--- 16225,16231 ---- + curwin->w_curswant = get_dict_number(dict, (char_u *)"curswant"); + curwin->w_set_curswant = FALSE; + +! set_topline(curwin, get_dict_number(dict, (char_u *)"topline")); + #ifdef FEAT_DIFF + curwin->w_topfill = get_dict_number(dict, (char_u *)"topfill"); + #endif +*** ../vim-7.0.090/src/version.c Tue Sep 5 20:56:11 2006 +--- src/version.c Wed Sep 6 22:12:31 2006 +*************** +*** 668,669 **** +--- 668,671 ---- + { /* Add new patch number below this line */ ++ /**/ ++ 91, + /**/ + +-- +Shit makes the flowers grow and that's beautiful + + /// Bram Moolenaar -- Bram@Moolenaar.net -- http://www.Moolenaar.net \\\ +/// sponsor Vim, vote for features -- http://www.Vim.org/sponsor/ \\\ +\\\ download, build and distribute -- http://www.A-A-P.org /// + \\\ help me help AIDS victims -- http://ICCF-Holland.org /// --- vim-7.0.orig/upstream/patches/7.0.100 +++ vim-7.0/upstream/patches/7.0.100 @@ -0,0 +1,64 @@ +To: vim-dev@vim.org +Subject: Patch 7.0.100 +Fcc: outbox +From: Bram Moolenaar +Mime-Version: 1.0 +Content-Type: text/plain; charset=ISO-8859-1 +Content-Transfer-Encoding: 8bit +------------ + +Patch 7.0.100 +Problem: "zug" may report the wrong filename. (Lawrence Kesteloot) +Solution: Call home_replace() to fill NameBuff[]. +Files: src/spell.c + + +*** ../vim-7.0.099/src/spell.c Tue Aug 29 17:28:56 2006 +--- src/spell.c Mon Sep 11 20:45:35 2006 +*************** +*** 1483,1489 **** + else if ((mode == FIND_COMPOUND || mode == FIND_KEEPCOMPOUND + || !word_ends)) + { +! /* If there is no flag or the word is shorter than + * COMPOUNDMIN reject it quickly. + * Makes you wonder why someone puts a compound flag on a word + * that's too short... Myspell compatibility requires this +--- 1483,1489 ---- + else if ((mode == FIND_COMPOUND || mode == FIND_KEEPCOMPOUND + || !word_ends)) + { +! /* If there is no compound flag or the word is shorter than + * COMPOUNDMIN reject it quickly. + * Makes you wonder why someone puts a compound flag on a word + * that's too short... Myspell compatibility requires this +*************** +*** 9336,9342 **** +--- 9336,9345 ---- + { + fputc('#', fd); + if (undo) ++ { ++ home_replace(NULL, fname, NameBuff, MAXPATHL, TRUE); + smsg((char_u *)_("Word removed from %s"), NameBuff); ++ } + } + fseek(fd, fpos_next, SEEK_SET); + } +*** ../vim-7.0.099/src/version.c Sun Sep 10 21:38:48 2006 +--- src/version.c Mon Sep 11 21:36:13 2006 +*************** +*** 668,669 **** +--- 668,671 ---- + { /* Add new patch number below this line */ ++ /**/ ++ 100, + /**/ + +-- +Be nice to your kids... they'll be the ones choosing your nursing home. + + /// Bram Moolenaar -- Bram@Moolenaar.net -- http://www.Moolenaar.net \\\ +/// sponsor Vim, vote for features -- http://www.Vim.org/sponsor/ \\\ +\\\ download, build and distribute -- http://www.A-A-P.org /// + \\\ help me help AIDS victims -- http://ICCF-Holland.org /// --- vim-7.0.orig/upstream/patches/7.0.127 +++ vim-7.0/upstream/patches/7.0.127 @@ -0,0 +1,99 @@ +To: vim-dev@vim.org +Subject: Patch 7.0.127 +Fcc: outbox +From: Bram Moolenaar +Mime-Version: 1.0 +Content-Type: text/plain; charset=ISO-8859-1 +Content-Transfer-Encoding: 8bit +------------ + +Patch 7.0.127 +Problem: Crash when swap files has invalid timestamp. +Solution: Check return value of ctime() for being NULL. +Files: src/memline.c + + +*** ../vim-7.0.126/src/memline.c Tue Aug 29 17:28:56 2006 +--- src/memline.c Tue Oct 10 16:19:56 2006 +*************** +*** 1633,1638 **** +--- 1633,1639 ---- + int fd; + struct block0 b0; + time_t x = (time_t)0; ++ char *p; + #ifdef UNIX + char_u uname[B0_UNAME_SIZE]; + #endif +*************** +*** 1652,1659 **** + #endif + MSG_PUTS(_(" dated: ")); + x = st.st_mtime; /* Manx C can't do &st.st_mtime */ +! MSG_PUTS(ctime(&x)); /* includes '\n' */ +! + } + + /* +--- 1653,1663 ---- + #endif + MSG_PUTS(_(" dated: ")); + x = st.st_mtime; /* Manx C can't do &st.st_mtime */ +! p = ctime(&x); /* includes '\n' */ +! if (p == NULL) +! MSG_PUTS("(invalid)\n"); +! else +! MSG_PUTS(p); + } + + /* +*************** +*** 3652,3657 **** +--- 3656,3662 ---- + { + struct stat st; + time_t x, sx; ++ char *p; + + ++no_wait_return; + (void)EMSG(_("E325: ATTENTION")); +*************** +*** 3666,3672 **** + { + MSG_PUTS(_(" dated: ")); + x = st.st_mtime; /* Manx C can't do &st.st_mtime */ +! MSG_PUTS(ctime(&x)); + if (sx != 0 && x > sx) + MSG_PUTS(_(" NEWER than swap file!\n")); + } +--- 3671,3681 ---- + { + MSG_PUTS(_(" dated: ")); + x = st.st_mtime; /* Manx C can't do &st.st_mtime */ +! p = ctime(&x); /* includes '\n' */ +! if (p == NULL) +! MSG_PUTS("(invalid)\n"); +! else +! MSG_PUTS(p); + if (sx != 0 && x > sx) + MSG_PUTS(_(" NEWER than swap file!\n")); + } +*** ../vim-7.0.126/src/version.c Tue Oct 10 15:49:41 2006 +--- src/version.c Tue Oct 10 16:18:51 2006 +*************** +*** 668,669 **** +--- 668,671 ---- + { /* Add new patch number below this line */ ++ /**/ ++ 127, + /**/ + +-- +How To Keep A Healthy Level Of Insanity: +17. When the money comes out the ATM, scream "I won!, I won! 3rd + time this week!!!!!" + + /// Bram Moolenaar -- Bram@Moolenaar.net -- http://www.Moolenaar.net \\\ +/// sponsor Vim, vote for features -- http://www.Vim.org/sponsor/ \\\ +\\\ download, build and distribute -- http://www.A-A-P.org /// + \\\ help me help AIDS victims -- http://ICCF-Holland.org /// --- vim-7.0.orig/upstream/patches/7.0.103 +++ vim-7.0/upstream/patches/7.0.103 @@ -0,0 +1,53 @@ +To: vim-dev@vim.org +Subject: Patch 7.0.103 +Fcc: outbox +From: Bram Moolenaar +Mime-Version: 1.0 +Content-Type: text/plain; charset=ISO-8859-1 +Content-Transfer-Encoding: 8bit +------------ + +Patch 7.0.103 (after 7.0.101) +Problem: Compiler warning for uninitialized variable. (Tony Mechelynck) +Solution: Init variable. +Files: src/spell.c + + +*** ../vim-7.0.102/src/spell.c Tue Sep 12 22:24:48 2006 +--- src/spell.c Wed Sep 13 20:46:22 2006 +*************** +*** 9251,9257 **** + 'spellfile' */ + int undo; /* TRUE for "zug", "zuG", "zuw" and "zuW" */ + { +! FILE *fd; + buf_T *buf = NULL; + int new_spf = FALSE; + char_u *fname; +--- 9251,9257 ---- + 'spellfile' */ + int undo; /* TRUE for "zug", "zuG", "zuw" and "zuW" */ + { +! FILE *fd = NULL; + buf_T *buf = NULL; + int new_spf = FALSE; + char_u *fname; +*** ../vim-7.0.102/src/version.c Thu Sep 14 10:25:34 2006 +--- src/version.c Thu Sep 14 10:47:39 2006 +*************** +*** 668,669 **** +--- 668,671 ---- + { /* Add new patch number below this line */ ++ /**/ ++ 103, + /**/ + +-- +ARTHUR: Go on, Bors, chop its head off. +BORS: Right. Silly little bleeder. One rabbit stew coming up. + "Monty Python and the Holy Grail" PYTHON (MONTY) PICTURES LTD + + /// Bram Moolenaar -- Bram@Moolenaar.net -- http://www.Moolenaar.net \\\ +/// sponsor Vim, vote for features -- http://www.Vim.org/sponsor/ \\\ +\\\ download, build and distribute -- http://www.A-A-P.org /// + \\\ help me help AIDS victims -- http://ICCF-Holland.org /// --- vim-7.0.orig/upstream/patches/7.0.048 +++ vim-7.0/upstream/patches/7.0.048 @@ -0,0 +1,71 @@ +To: vim-dev@vim.org +Subject: Patch 7.0.048 +Fcc: outbox +From: Bram Moolenaar +Mime-Version: 1.0 +Content-Type: text/plain; charset=ISO-8859-1 +Content-Transfer-Encoding: 8bit +------------ + +Patch 7.0.048 +Problem: Writing a compressed file fails when there are parens in the name. + (Wang Jian) +Solution: Put quotes around the temp file name. +Files: runtime/autoload/gzip.vim + + +*** ../vim-7.0.047/runtime/autoload/gzip.vim Wed Apr 5 22:17:15 2006 +--- runtime/autoload/gzip.vim Wed Jul 19 23:53:52 2006 +*************** +*** 1,6 **** + " Vim autoload file for editing compressed files. + " Maintainer: Bram Moolenaar +! " Last Change: 2006 Mar 31 + + " These functions are used by the gzip plugin. + +--- 1,6 ---- + " Vim autoload file for editing compressed files. + " Maintainer: Bram Moolenaar +! " Last Change: 2006 Jul 19 + + " These functions are used by the gzip plugin. + +*************** +*** 127,135 **** + let nmt = s:tempname(nm) + if rename(nm, nmt) == 0 + if exists("b:gzip_comp_arg") +! call system(a:cmd . " " . b:gzip_comp_arg . " " . nmt) + else +! call system(a:cmd . " " . nmt) + endif + call rename(nmt . "." . expand(":e"), nm) + endif +--- 127,135 ---- + let nmt = s:tempname(nm) + if rename(nm, nmt) == 0 + if exists("b:gzip_comp_arg") +! call system(a:cmd . " " . b:gzip_comp_arg . " '" . nmt . "'") + else +! call system(a:cmd . " '" . nmt . "'") + endif + call rename(nmt . "." . expand(":e"), nm) + endif +*** ../vim-7.0.047/src/version.c Tue Aug 8 19:10:35 2006 +--- src/version.c Tue Aug 8 19:26:51 2006 +*************** +*** 668,669 **** +--- 668,671 ---- + { /* Add new patch number below this line */ ++ /**/ ++ 48, + /**/ + +-- +A fool learns from his mistakes, a wise man from someone else's. + + /// Bram Moolenaar -- Bram@Moolenaar.net -- http://www.Moolenaar.net \\\ +/// sponsor Vim, vote for features -- http://www.Vim.org/sponsor/ \\\ +\\\ download, build and distribute -- http://www.A-A-P.org /// + \\\ help me help AIDS victims -- http://ICCF-Holland.org /// --- vim-7.0.orig/upstream/patches/7.0.016 +++ vim-7.0/upstream/patches/7.0.016 @@ -0,0 +1,67 @@ +To: vim-dev@vim.org +Subject: Patch 7.0.016 +Fcc: outbox +From: Bram Moolenaar +Mime-Version: 1.0 +Content-Type: text/plain; charset=ISO-8859-1 +Content-Transfer-Encoding: 8bit +------------ + +Patch 7.0.016 +Problem: Printing doesn't work for "dec-mcs" encoding. +Solution: Add "dec-mcs", "mac-roman" and "hp-roman8" to the list of + recognized 8-bit encodings. (Mike Williams) +Files: src/mbyte.c + + +*** ../vim-7.0.015/src/mbyte.c Wed May 10 15:22:50 2006 +--- src/mbyte.c Sat May 13 09:12:43 2006 +*************** +*** 311,317 **** + + #define IDX_MACROMAN 57 + {"macroman", ENC_8BIT + ENC_MACROMAN, 0}, /* Mac OS */ +! #define IDX_COUNT 58 + }; + + /* +--- 311,321 ---- + + #define IDX_MACROMAN 57 + {"macroman", ENC_8BIT + ENC_MACROMAN, 0}, /* Mac OS */ +! #define IDX_DECMCS 58 +! {"dec-mcs", ENC_8BIT, 0}, /* DEC MCS */ +! #define IDX_HPROMAN8 59 +! {"hp-roman8", ENC_8BIT, 0}, /* HP Roman8 */ +! #define IDX_COUNT 60 + }; + + /* +*************** +*** 386,391 **** +--- 390,396 ---- + {"950", IDX_BIG5}, + #endif + {"mac", IDX_MACROMAN}, ++ {"mac-roman", IDX_MACROMAN}, + {NULL, 0} + }; + +*** ../vim-7.0.015/src/version.c Fri May 12 19:27:55 2006 +--- src/version.c Sat May 13 09:11:27 2006 +*************** +*** 668,669 **** +--- 668,671 ---- + { /* Add new patch number below this line */ ++ /**/ ++ 16, + /**/ + +-- +hundred-and-one symptoms of being an internet addict: +135. You cut classes or miss work so you can stay home and browse the web. + + /// Bram Moolenaar -- Bram@Moolenaar.net -- http://www.Moolenaar.net \\\ +/// sponsor Vim, vote for features -- http://www.Vim.org/sponsor/ \\\ +\\\ download, build and distribute -- http://www.A-A-P.org /// + \\\ help me help AIDS victims -- http://ICCF-Holland.org /// --- vim-7.0.orig/upstream/patches/7.0.123 +++ vim-7.0/upstream/patches/7.0.123 @@ -0,0 +1,112 @@ +To: vim-dev@vim.org +Subject: Patch 7.0.123 +Fcc: outbox +From: Bram Moolenaar +Mime-Version: 1.0 +Content-Type: text/plain; charset=ISO-8859-1 +Content-Transfer-Encoding: 8bit +------------ + +Patch 7.0.123 +Problem: On SCO Openserver configure selects the wrong terminal library. +Solution: Put terminfo before the other libraries. (Roger Cornelius) + Also fix a small problem compiling on Mac without Darwin. +Files: src/configure.in, src/auto/configure + + +*** ../vim-7.0.122/src/configure.in Tue Sep 5 17:30:25 2006 +--- src/configure.in Thu Oct 5 22:01:13 2006 +*************** +*** 681,687 **** + AC_MSG_CHECKING([if -pthread should be used]) + threadsafe_flag= + thread_lib= +! if test "x$MACOSX" != "xyes"; then + test "$GCC" = yes && threadsafe_flag="-pthread" + if test "`(uname) 2>/dev/null`" = FreeBSD; then + threadsafe_flag="-D_THREAD_SAFE" +--- 681,688 ---- + AC_MSG_CHECKING([if -pthread should be used]) + threadsafe_flag= + thread_lib= +! dnl if test "x$MACOSX" != "xyes"; then +! if test "`(uname) 2>/dev/null`" != Darwin; then + test "$GCC" = yes && threadsafe_flag="-pthread" + if test "`(uname) 2>/dev/null`" = FreeBSD; then + threadsafe_flag="-D_THREAD_SAFE" +*************** +*** 2151,2158 **** + dnl Newer versions of ncurses are preferred over anything. + dnl Older versions of ncurses have bugs, get a new one! + dnl Digital Unix (OSF1) should use curses (Ronald Schild). + case "`uname -s 2>/dev/null`" in +! OSF1) tlibs="ncurses curses termlib termcap";; + *) tlibs="ncurses termlib termcap curses";; + esac + for libname in $tlibs; do +--- 2152,2160 ---- + dnl Newer versions of ncurses are preferred over anything. + dnl Older versions of ncurses have bugs, get a new one! + dnl Digital Unix (OSF1) should use curses (Ronald Schild). ++ dnl On SCO Openserver should prefer termlib (Roger Cornelius). + case "`uname -s 2>/dev/null`" in +! OSF1|SCO_SV) tlibs="ncurses curses termlib termcap";; + *) tlibs="ncurses termlib termcap curses";; + esac + for libname in $tlibs; do +*** ../vim-7.0.122/src/auto/configure Tue Sep 5 17:30:25 2006 +--- src/auto/configure Thu Oct 5 22:02:45 2006 +*************** +*** 4256,4262 **** + echo $ECHO_N "checking if -pthread should be used... $ECHO_C" >&6 + threadsafe_flag= + thread_lib= +! if test "x$MACOSX" != "xyes"; then + test "$GCC" = yes && threadsafe_flag="-pthread" + if test "`(uname) 2>/dev/null`" = FreeBSD; then + threadsafe_flag="-D_THREAD_SAFE" +--- 4256,4262 ---- + echo $ECHO_N "checking if -pthread should be used... $ECHO_C" >&6 + threadsafe_flag= + thread_lib= +! if test "`(uname) 2>/dev/null`" != Darwin; then + test "$GCC" = yes && threadsafe_flag="-pthread" + if test "`(uname) 2>/dev/null`" = FreeBSD; then + threadsafe_flag="-D_THREAD_SAFE" +*************** +*** 11555,11562 **** + else + echo "$as_me:$LINENO: result: empty: automatic terminal library selection" >&5 + echo "${ECHO_T}empty: automatic terminal library selection" >&6 +! case "`uname -s 2>/dev/null`" in +! OSF1) tlibs="ncurses curses termlib termcap";; + *) tlibs="ncurses termlib termcap curses";; + esac + for libname in $tlibs; do +--- 11555,11562 ---- + else + echo "$as_me:$LINENO: result: empty: automatic terminal library selection" >&5 + echo "${ECHO_T}empty: automatic terminal library selection" >&6 +! case "`uname -s 2>/dev/null`" in +! OSF1|SCO_SV) tlibs="ncurses curses termlib termcap";; + *) tlibs="ncurses termlib termcap curses";; + esac + for libname in $tlibs; do +*** ../vim-7.0.122/src/version.c Mon Oct 9 22:11:52 2006 +--- src/version.c Tue Oct 10 11:37:26 2006 +*************** +*** 668,669 **** +--- 668,671 ---- + { /* Add new patch number below this line */ ++ /**/ ++ 123, + /**/ + +-- +How To Keep A Healthy Level Of Insanity: +12. Sing along at the opera. + + /// Bram Moolenaar -- Bram@Moolenaar.net -- http://www.Moolenaar.net \\\ +/// sponsor Vim, vote for features -- http://www.Vim.org/sponsor/ \\\ +\\\ download, build and distribute -- http://www.A-A-P.org /// + \\\ help me help AIDS victims -- http://ICCF-Holland.org /// --- vim-7.0.orig/upstream/patches/7.0.011 +++ vim-7.0/upstream/patches/7.0.011 @@ -0,0 +1,65 @@ +To: vim-dev@vim.org +Subject: Patch 7.0.011 +Fcc: outbox +From: Bram Moolenaar +Mime-Version: 1.0 +Content-Type: text/plain; charset=ISO-8859-1 +Content-Transfer-Encoding: 8bit +------------ + +Patch 7.0.011 +Problem: Can't compile without the folding and with the eval feature. +Solution: Add an #ifdef. (Vallimar) +Files: src/option.c + + +*** ../vim-7.0.010/src/option.c Wed May 10 15:22:50 2006 +--- src/option.c Wed May 10 19:37:10 2006 +*************** +*** 5227,5239 **** + case PV_STL: return &curwin->w_p_stl_flags; + #endif + #ifdef FEAT_EVAL + case PV_FDE: return &curwin->w_p_fde_flags; + case PV_FDT: return &curwin->w_p_fdt_flags; + # ifdef FEAT_BEVAL + case PV_BEXPR: return &curbuf->b_p_bexpr_flags; + # endif +- #endif +- #if defined(FEAT_EVAL) + # if defined(FEAT_CINDENT) + case PV_INDE: return &curbuf->b_p_inde_flags; + # endif +--- 5227,5239 ---- + case PV_STL: return &curwin->w_p_stl_flags; + #endif + #ifdef FEAT_EVAL ++ # ifdef FEAT_FOLDING + case PV_FDE: return &curwin->w_p_fde_flags; + case PV_FDT: return &curwin->w_p_fdt_flags; ++ # endif + # ifdef FEAT_BEVAL + case PV_BEXPR: return &curbuf->b_p_bexpr_flags; + # endif + # if defined(FEAT_CINDENT) + case PV_INDE: return &curbuf->b_p_inde_flags; + # endif +*** ../vim-7.0.010/src/version.c Wed May 10 17:55:37 2006 +--- src/version.c Thu May 11 19:22:54 2006 +*************** +*** 668,669 **** +--- 668,671 ---- + { /* Add new patch number below this line */ ++ /**/ ++ 11, + /**/ + +-- +hundred-and-one symptoms of being an internet addict: +112. You are amazed that anyone uses a phone without a modem on it...let + alone hear actual voices. + + /// Bram Moolenaar -- Bram@Moolenaar.net -- http://www.Moolenaar.net \\\ +/// sponsor Vim, vote for features -- http://www.Vim.org/sponsor/ \\\ +\\\ download, build and distribute -- http://www.A-A-P.org /// + \\\ help me help AIDS victims -- http://ICCF-Holland.org /// --- vim-7.0.orig/upstream/patches/7.0.001 +++ vim-7.0/upstream/patches/7.0.001 @@ -0,0 +1,52 @@ +To: vim-dev@vim.org +Subject: Patch 7.0.001 +Fcc: outbox +From: Bram Moolenaar +Mime-Version: 1.0 +Content-Type: text/plain; charset=ISO-8859-1 +Content-Transfer-Encoding: 8bit +------------ + +Patch 7.0.001 +Problem: ":set spellsuggest+=10" does not work. (Suresh Govindachar) +Solution: Add P_COMMA to the 'spellsuggest' flags. +Files: src/option.c + + +*** ../vim-7.0.000/src/option.c Wed May 3 23:26:04 2006 +--- src/option.c Sun May 7 17:54:46 2006 +*************** +*** 2294,2300 **** + {(char_u *)0L, (char_u *)0L} + #endif + }, +! {"spellsuggest", "sps", P_STRING|P_VI_DEF|P_EXPAND|P_SECURE, + #ifdef FEAT_SPELL + (char_u *)&p_sps, PV_NONE, + {(char_u *)"best", (char_u *)0L} +--- 2294,2300 ---- + {(char_u *)0L, (char_u *)0L} + #endif + }, +! {"spellsuggest", "sps", P_STRING|P_VI_DEF|P_EXPAND|P_SECURE|P_COMMA, + #ifdef FEAT_SPELL + (char_u *)&p_sps, PV_NONE, + {(char_u *)"best", (char_u *)0L} +*** ../vim-7.0.000/src/version.c Wed May 3 00:04:24 2006 +--- src/version.c Tue May 9 14:23:20 2006 +*************** +*** 668,669 **** +--- 668,671 ---- + { /* Add new patch number below this line */ ++ /**/ ++ 1, + /**/ + +-- +hundred-and-one symptoms of being an internet addict: +70. ISDN lines are added to your house on a hourly basis + + /// Bram Moolenaar -- Bram@Moolenaar.net -- http://www.Moolenaar.net \\\ +/// sponsor Vim, vote for features -- http://www.Vim.org/sponsor/ \\\ +\\\ download, build and distribute -- http://www.A-A-P.org /// + \\\ help me help AIDS victims -- http://ICCF-Holland.org /// --- vim-7.0.orig/upstream/patches/7.0.115 +++ vim-7.0/upstream/patches/7.0.115 @@ -0,0 +1,75 @@ +To: vim-dev@vim.org +Subject: Patch 7.0.115 +Fcc: outbox +From: Bram Moolenaar +Mime-Version: 1.0 +Content-Type: text/plain; charset=ISO-8859-1 +Content-Transfer-Encoding: 8bit +------------ + +Patch 7.0.115 +Problem: When 'ignorecase' is set, Insert mode completion only adds "foo" + and not "Foo" when both are found. + A found match isn't displayed right away when 'completeopt' does + not have "menu" or "menuone". +Solution: Do not ignore case when checking if a completion match already + exists. call ins_compl_check_keys() also when not using a popup + menu. (Yukihiro Nakadaira) +Files: src/edit.c + + +*** ../vim-7.0.114/src/edit.c Tue Oct 3 15:22:00 2006 +--- src/edit.c Tue Oct 3 14:57:47 2006 +*************** +*** 2157,2163 **** + do + { + if ( !(match->cp_flags & ORIGINAL_TEXT) +! && ins_compl_equal(match, str, len) + && match->cp_str[len] == NUL) + return NOTDONE; + match = match->cp_next; +--- 2157,2163 ---- + do + { + if ( !(match->cp_flags & ORIGINAL_TEXT) +! && STRNCMP(match->cp_str, str, len) == 0 + && match->cp_str[len] == NUL) + return NOTDONE; + match = match->cp_next; +*************** +*** 4042,4048 **** + if (got_int) + break; + /* Fill the popup menu as soon as possible. */ +! if (pum_wanted() && type != -1) + ins_compl_check_keys(0); + + if ((ctrl_x_mode != 0 && ctrl_x_mode != CTRL_X_WHOLE_LINE) +--- 4042,4048 ---- + if (got_int) + break; + /* Fill the popup menu as soon as possible. */ +! if (type != -1) + ins_compl_check_keys(0); + + if ((ctrl_x_mode != 0 && ctrl_x_mode != CTRL_X_WHOLE_LINE) +*** ../vim-7.0.114/src/version.c Tue Oct 3 15:36:09 2006 +--- src/version.c Tue Oct 3 15:46:15 2006 +*************** +*** 668,669 **** +--- 668,671 ---- + { /* Add new patch number below this line */ ++ /**/ ++ 115, + /**/ + +-- +The budget process was invented by an alien race of sadistic beings who +resemble large cats. + (Scott Adams - The Dilbert principle) + + /// Bram Moolenaar -- Bram@Moolenaar.net -- http://www.Moolenaar.net \\\ +/// sponsor Vim, vote for features -- http://www.Vim.org/sponsor/ \\\ +\\\ download, build and distribute -- http://www.A-A-P.org /// + \\\ help me help AIDS victims -- http://ICCF-Holland.org /// --- vim-7.0.orig/upstream/patches/7.0.084 +++ vim-7.0/upstream/patches/7.0.084 @@ -0,0 +1,221 @@ +To: vim-dev@vim.org +Subject: Patch 7.0.084 +Fcc: outbox +From: Bram Moolenaar +Mime-Version: 1.0 +Content-Type: text/plain; charset=ISO-8859-1 +Content-Transfer-Encoding: 8bit +------------ + +Patch 7.0.084 +Problem: The garbage collector may do its work while some Lists or + Dictionaries are used internally, e.g., by ":echo" that runs into + the more-prompt or ":echo [garbagecollect()]". +Solution: Only do garbage collection when waiting for a character at the + toplevel. Let garbagecollect() set a flag that is handled at the + toplevel before waiting for a character. +Files: src/eval.c, src/getchar.c, src/globals.h, src/main.c + + +*** ../vim-7.0.083/src/eval.c Sun Sep 3 15:38:02 2006 +--- src/eval.c Tue Sep 5 11:49:38 2006 +*************** +*** 6074,6079 **** +--- 6074,6083 ---- + tabpage_T *tp; + #endif + ++ /* Only do this once. */ ++ want_garbage_collect = FALSE; ++ may_garbage_collect = FALSE; ++ + /* + * 1. Go through all accessible variables and mark all lists and dicts + * with copyID. +*************** +*** 9636,9642 **** + typval_T *argvars; + typval_T *rettv; + { +! garbage_collect(); + } + + /* +--- 9640,9648 ---- + typval_T *argvars; + typval_T *rettv; + { +! /* This is postponed until we are back at the toplevel, because we may be +! * using Lists and Dicts internally. E.g.: ":echo [garbagecollect()]". */ +! want_garbage_collect = TRUE; + } + + /* +*** ../vim-7.0.083/src/getchar.c Wed May 3 23:19:24 2006 +--- src/getchar.c Tue Sep 5 12:55:54 2006 +*************** +*** 1451,1457 **** + { + updatescript(0); + #ifdef FEAT_EVAL +! garbage_collect(); + #endif + } + +--- 1451,1458 ---- + { + updatescript(0); + #ifdef FEAT_EVAL +! if (may_garbage_collect) +! garbage_collect(); + #endif + } + +*************** +*** 1502,1507 **** +--- 1503,1515 ---- + int i; + #endif + ++ #ifdef FEAT_EVAL ++ /* Do garbage collection when garbagecollect() was called previously and ++ * we are now at the toplevel. */ ++ if (may_garbage_collect && want_garbage_collect) ++ garbage_collect(); ++ #endif ++ + /* + * If a character was put back with vungetc, it was already processed. + * Return it directly. +*************** +*** 1511,1523 **** + c = old_char; + old_char = -1; + mod_mask = old_mod_mask; +- return c; + } +! +! mod_mask = 0x0; +! last_recorded_len = 0; +! for (;;) /* this is done twice if there are modifiers */ + { + if (mod_mask) /* no mapping after modifier has been read */ + { + ++no_mapping; +--- 1519,1531 ---- + c = old_char; + old_char = -1; + mod_mask = old_mod_mask; + } +! else + { ++ mod_mask = 0x0; ++ last_recorded_len = 0; ++ for (;;) /* this is done twice if there are modifiers */ ++ { + if (mod_mask) /* no mapping after modifier has been read */ + { + ++no_mapping; +*************** +*** 1695,1702 **** + } + #endif + +! return c; + } + } + + /* +--- 1703,1722 ---- + } + #endif + +! break; +! } + } ++ ++ #ifdef FEAT_EVAL ++ /* ++ * In the main loop "may_garbage_collect" can be set to do garbage ++ * collection in the first next vgetc(). It's disabled after that to ++ * avoid internally used Lists and Dicts to be freed. ++ */ ++ may_garbage_collect = FALSE; ++ #endif ++ ++ return c; + } + + /* +*** ../vim-7.0.083/src/globals.h Sat Sep 2 14:52:41 2006 +--- src/globals.h Tue Sep 5 11:46:10 2006 +*************** +*** 300,308 **** + #endif + + #ifdef FEAT_EVAL +! EXTERN scid_T current_SID INIT(= 0); /* ID of script being sourced or +! was sourced to define the +! current function. */ + #endif + + #if defined(FEAT_EVAL) || defined(FEAT_SYN_HL) +--- 300,315 ---- + #endif + + #ifdef FEAT_EVAL +! /* Garbage collection can only take place when we are sure there are no Lists +! * or Dictionaries being used internally. This is flagged with +! * "may_garbage_collect" when we are at the toplevel. +! * "want_garbage_collect" is set by the garbagecollect() function, which means +! * we do garbage collection before waiting for a char at the toplevel. */ +! EXTERN int may_garbage_collect INIT(= FALSE); +! EXTERN int want_garbage_collect INIT(= FALSE); +! +! /* ID of script being sourced or was sourced to define the current function. */ +! EXTERN scid_T current_SID INIT(= 0); + #endif + + #if defined(FEAT_EVAL) || defined(FEAT_SYN_HL) +*** ../vim-7.0.083/src/main.c Tue Aug 29 17:28:56 2006 +--- src/main.c Tue Sep 5 12:33:47 2006 +*************** +*** 1130,1135 **** +--- 1130,1145 ---- + */ + update_curswant(); + ++ #ifdef FEAT_EVAL ++ /* ++ * May perform garbage collection when waiting for a character, but ++ * only at the very toplevel. Otherwise we may be using a List or ++ * Dict internally somewhere. ++ * "may_garbage_collect" is reset in vgetc() which is invoked through ++ * do_exmode() and normal_cmd(). ++ */ ++ may_garbage_collect = (!cmdwin && !noexmode); ++ #endif + /* + * If we're invoked as ex, do a round of ex commands. + * Otherwise, get and execute a normal mode command. +*** ../vim-7.0.083/src/version.c Sun Sep 3 16:39:51 2006 +--- src/version.c Tue Sep 5 12:51:28 2006 +*************** +*** 668,669 **** +--- 668,671 ---- + { /* Add new patch number below this line */ ++ /**/ ++ 84, + /**/ + +-- +LAUNCELOT: At last! A call! A cry of distress ... + (he draws his sword, and turns to CONCORDE) + Concorde! Brave, Concorde ... you shall not have died in vain! +CONCORDE: I'm not quite dead, sir ... + "Monty Python and the Holy Grail" PYTHON (MONTY) PICTURES LTD + + /// Bram Moolenaar -- Bram@Moolenaar.net -- http://www.Moolenaar.net \\\ +/// sponsor Vim, vote for features -- http://www.Vim.org/sponsor/ \\\ +\\\ download, build and distribute -- http://www.A-A-P.org /// + \\\ help me help AIDS victims -- http://ICCF-Holland.org /// --- vim-7.0.orig/upstream/patches/7.0.063 +++ vim-7.0/upstream/patches/7.0.063 @@ -0,0 +1,45 @@ +To: vim-dev@vim.org +Subject: Patch 7.0.063 +Fcc: outbox +From: Bram Moolenaar +Mime-Version: 1.0 +Content-Type: text/plain; charset=ISO-8859-1 +Content-Transfer-Encoding: 8bit +------------ + +Patch 7.0.063 +Problem: Tiny chance for a memory leak. (coverity) +Solution: Free pointer when next memory allocation fails. +Files: src/eval.c + + +*** ../vim-7.0.062/src/eval.c Wed Aug 16 19:34:59 2006 +--- src/eval.c Wed Aug 16 21:33:24 2006 +*************** +*** 18811,18816 **** +--- 18811,18817 ---- + if (dict_add(fudi.fd_dict, fudi.fd_di) == FAIL) + { + vim_free(fudi.fd_di); ++ vim_free(fp); + goto erret; + } + } +*** ../vim-7.0.062/src/version.c Wed Aug 16 21:42:34 2006 +--- src/version.c Wed Aug 16 22:02:57 2006 +*************** +*** 668,669 **** +--- 668,671 ---- + { /* Add new patch number below this line */ ++ /**/ ++ 63, + /**/ + +-- +hundred-and-one symptoms of being an internet addict: +167. You have more than 200 websites bookmarked. + + /// Bram Moolenaar -- Bram@Moolenaar.net -- http://www.Moolenaar.net \\\ +/// sponsor Vim, vote for features -- http://www.Vim.org/sponsor/ \\\ +\\\ download, build and distribute -- http://www.A-A-P.org /// + \\\ help me help AIDS victims -- http://ICCF-Holland.org /// --- vim-7.0.orig/upstream/patches/7.0.052 +++ vim-7.0/upstream/patches/7.0.052 @@ -0,0 +1,66 @@ +To: vim-dev@vim.org +Subject: Patch 7.0.052 +Fcc: outbox +From: Bram Moolenaar +Mime-Version: 1.0 +Content-Type: text/plain; charset=ISO-8859-1 +Content-Transfer-Encoding: 8bit +------------ + +Patch 7.0.052 +Problem: The user may not be aware that the Vim server allows others more + functionality than desired. +Solution: When running Vim as root don't become a Vim server without an + explicit --servername argument. +Files: src/main.c + + +*** ../vim-7.0.051/src/main.c Mon Jun 19 10:56:20 2006 +--- src/main.c Tue Aug 8 11:02:44 2006 +*************** +*** 3212,3221 **** + * Register for remote command execution with :serversend and --remote + * unless there was a -X or a --servername '' on the command line. + * Only register nongui-vim's with an explicit --servername argument. + */ + if (X_DISPLAY != NULL && parmp->servername != NULL && ( + # ifdef FEAT_GUI +! gui.in_use || + # endif + parmp->serverName_arg != NULL)) + { +--- 3212,3226 ---- + * Register for remote command execution with :serversend and --remote + * unless there was a -X or a --servername '' on the command line. + * Only register nongui-vim's with an explicit --servername argument. ++ * When running as root --servername is also required. + */ + if (X_DISPLAY != NULL && parmp->servername != NULL && ( + # ifdef FEAT_GUI +! (gui.in_use +! # ifdef UNIX +! && getuid() != 0 +! # endif +! ) || + # endif + parmp->serverName_arg != NULL)) + { +*** ../vim-7.0.051/src/version.c Fri Aug 11 22:56:44 2006 +--- src/version.c Tue Aug 15 21:41:24 2006 +*************** +*** 668,669 **** +--- 668,671 ---- + { /* Add new patch number below this line */ ++ /**/ ++ 52, + /**/ + +-- +hundred-and-one symptoms of being an internet addict: +148. You find it easier to dial-up the National Weather Service + Weather/your_town/now.html than to simply look out the window. + + /// Bram Moolenaar -- Bram@Moolenaar.net -- http://www.Moolenaar.net \\\ +/// sponsor Vim, vote for features -- http://www.Vim.org/sponsor/ \\\ +\\\ download, build and distribute -- http://www.A-A-P.org /// + \\\ help me help AIDS victims -- http://ICCF-Holland.org /// --- vim-7.0.orig/debian/gvim.desktop +++ vim-7.0/debian/gvim.desktop @@ -0,0 +1,79 @@ +[Desktop Entry] +Encoding=UTF-8 +Name=GVim Text Editor +Comment=Edit text files +Comment[af]=Redigeer tekslêers +Comment[am]=የጽሑፍ ፋይሎች ያስተካክሉ +Comment[ar]=حرّر ملفات نصية +Comment[az]=Mətn fayllarını redaktə edin +Comment[be]=Рэдагаваньне тэкставых файлаў +Comment[bg]=Редактиране на текстови файлове +Comment[bn]=টেক্স্ট ফাইল এডিট করুন +Comment[bs]=Izmijeni tekstualne datoteke +Comment[ca]=Edita fitxers de text +Comment[cs]=Úprava textových souborů +Comment[cy]=Golygu ffeiliau testun +Comment[da]=Redigér tekstfiler +Comment[de]=Textdateien bearbeiten +Comment[el]=Επεξεργασία αρχείων κειμένου +Comment[en_CA]=Edit text files +Comment[en_GB]=Edit text files +Comment[es]=Edita archivos de texto +Comment[et]=Redigeeri tekstifaile +Comment[eu]=Editatu testu-fitxategiak +Comment[fa]=ویرایش پرونده‌های متنی +Comment[fi]=Muokkaa tekstitiedostoja +Comment[fr]=Édite des fichiers texte +Comment[ga]=Eagar comhad Téacs +Comment[gu]=લખાણ ફાઇલોમાં ફેરફાર કરો +Comment[he]=ערוך קבצי טקסט +Comment[hi]=पाठ फ़ाइलें संपादित करें +Comment[hr]=Uređivanje tekstualne datoteke +Comment[hu]=Szövegfájlok szerkesztése +Comment[id]=Edit file teks +Comment[it]=Modifica file di testo +Comment[ja]=テキスト・ファイルを編集します +Comment[kn]=ಪಠ್ಯ ಕಡತಗಳನ್ನು ಸಂಪಾದಿಸು +Comment[ko]=텍스트 파일을 편집합니다 +Comment[lt]=Redaguoti tekstines bylas +Comment[lv]=Rediģēt teksta failus +Comment[mk]=Уреди текстуални фајлови +Comment[ml]=വാചക രചനകള് തിരുത്തുക +Comment[mn]=Текст файл боловсруулах +Comment[mr]=गद्य फाइल संपादित करा +Comment[ms]=Edit fail teks +Comment[nb]=Rediger tekstfiler +Comment[ne]=पाठ फाइललाई संशोधन गर्नुहोस् +Comment[nl]=Tekstbestanden bewerken +Comment[nn]=Rediger tekstfiler +Comment[no]=Rediger tekstfiler +Comment[or]=ପାଠ୍ଯ ଫାଇଲଗୁଡ଼ିକୁ ସମ୍ପାଦନ କରନ୍ତୁ +Comment[pa]=ਪਾਠ ਫਾਇਲਾਂ ਸੰਪਾਦਨ +Comment[pl]=Edytor plików tekstowych +Comment[pt]=Editar ficheiros de texto +Comment[pt_BR]=Edite arquivos de texto +Comment[ro]=Editare fişiere text +Comment[ru]=Редактор текстовых файлов +Comment[sk]=Úprava textových súborov +Comment[sl]=Urejanje datotek z besedili +Comment[sq]=Përpuno files teksti +Comment[sr]=Измени текстуалне датотеке +Comment[sr@Latn]=Izmeni tekstualne datoteke +Comment[sv]=Redigera textfiler +Comment[ta]=உரை கோப்புகளை தொகுக்கவும் +Comment[th]=แก้ไขแฟ้มข้อความ +Comment[tk]=Metin faýllary editle +Comment[tr]=Metin dosyalarını düzenle +Comment[uk]=Редактор текстових файлів +Comment[vi]=Soạn thảo tập tin văn bản +Comment[wa]=Asspougnî des fitchîs tecses +Comment[zh_CN]=编辑文本文件 +Comment[zh_TW]=編輯文字檔 +Exec=gvim -f %U +Terminal=false +Type=Application +Icon=/usr/share/pixmaps/vim.svg +Categories=Application;Utility;TextEditor; +StartupNotify=true +MimeType=text/plain; +NoDisplay=true --- vim-7.0.orig/debian/TODO +++ vim-7.0/debian/TODO @@ -0,0 +1,13 @@ + +* Make debcontrol.vim share the same destiny of debchangelog.vim (move it to + runtime/, integrate patches, send it to Bram, and get in touch about it with + Alfie at the debconf) + +-- Mon, 01 May 2006 11:06:59 -0400 zack + +* Update vim-policy.txt about debian.vim and contact maintainers of files + shipped in the wrong place. + http://lists.alioth.debian.org/pipermail/pkg-vim-maintainers/2006-May/002541.html + +-- Mon, 01 May 2006 11:07:17 -0400 zack + --- vim-7.0.orig/debian/rules +++ vim-7.0/debian/rules @@ -0,0 +1,552 @@ +#!/usr/bin/make -f + +export SHELL=/bin/bash +export DH_OPTIONS + +DEB_HOST_GNU_SYSTEM := $(shell dpkg-architecture -qDEB_HOST_GNU_SYSTEM) + +BUILDER := $(shell echo $${DEBEMAIL:-$${EMAIL:-$$(echo $$LOGNAME@$$(cat /etc/mailname 2> /dev/null))}}) + +ifneq (,$(findstring noopt,$(DEB_BUILD_OPTIONS))) + CFLAGS+=-O0 +else + CFLAGS+=-O2 +endif + +ifeq (,$(findstring nocheck,$(DEB_BUILD_OPTIONS))) + MAKETEST = yes +else + MAKETEST = no +endif + +INSTALL+=install +ifeq (,$(findstring nostrip,$(DEB_BUILD_OPTIONS))) + INSTALL+=-s +endif + +CFLAGS+=$(if $(findstring nodebug,$(DEB_BUILD_OPTIONS)),,-g -Wall) +CFGFLAGS+=--prefix=/usr +CFGFLAGS+=--mandir='$${prefix}'/share/man +CFGFLAGS+=--with-compiledby="$(BUILDER)" + +# "vim-tiny" features: in addition to those coming from the --with-features=xxx, +# "vim-tiny" is built with those listed in debian/tiny/features.txt +TINYFLAGS+=--with-features=small +TINYFLAGS+=--disable-syntax +TINYFLAGS+=--disable-gui +TINYFLAGS+=--disable-xsmp +TINYFLAGS+=--disable-xsmp-interact +TINYFLAGS+=--disable-netbeans +TINYFLAGS+=--disable-acl +TINYFLAGS+=--disable-gpm +TINYFLAGS+=--enable-nls +TINYFLAGS+=--enable-multibyte +TINYFLAGS+=--enable-multilang + +# add -DFEAT_* from debian/tiny/features.txt +TINYCFLAGS:=$(patsubst %,-D%,$(shell grep ^FEAT_ debian/tiny/features.txt | cut -f 1)) + +OPTFLAGS+=--enable-gpm +OPTFLAGS+=--enable-cscope +OPTFLAGS+=--with-features=big +OPTFLAGS+=--enable-multibyte + +GUIFLAGS+=--with-x +GUIFLAGS+=--enable-xim +GUIFLAGS+=--enable-fontset +GTK2FLAGS+=--enable-gui=gtk2 +GTK2FLAGS+=--with-features=big + +GNOMEFLAGS+=--enable-gui=gnome2 + +LESSTIFFLAGS+=--enable-gui=motif + +PERLFLAGS+=--enable-perlinterp +PERLFLAGS+=--disable-mzschemeinterp +PERLFLAGS+=--disable-pythoninterp +PERLFLAGS+=--disable-rubyinterp +PERLFLAGS+=--disable-tclinterp + +PYTHONFLAGS+=--enable-pythoninterp +PYTHONFLAGS+=--disable-mzschemeinterp +PYTHONFLAGS+=--disable-perlinterp +PYTHONFLAGS+=--disable-rubyinterp +PYTHONFLAGS+=--disable-tclinterp + +RUBYFLAGS+=--enable-rubyinterp +RUBYFLAGS+=--disable-mzschemeinterp +RUBYFLAGS+=--disable-perlinterp +RUBYFLAGS+=--disable-pythoninterp +RUBYFLAGS+=--disable-tclinterp + +TCLFLAGS+=--enable-tclinterp +TCLFLAGS+=--disable-mzschemeinterp +TCLFLAGS+=--disable-perlinterp +TCLFLAGS+=--disable-pythoninterp +TCLFLAGS+=--disable-rubyinterp + +BASICFLAGS+=--disable-mzschemeinterp +BASICFLAGS+=--disable-tclinterp +BASICFLAGS+=--disable-perlinterp +BASICFLAGS+=--enable-pythoninterp +BASICFLAGS+=--disable-rubyinterp + +ALLINTERPFLAGS+=--disable-mzschemeinterp +ALLINTERPFLAGS+=--enable-perlinterp +ALLINTERPFLAGS+=--enable-pythoninterp +ALLINTERPFLAGS+=--enable-rubyinterp +ALLINTERPFLAGS+=--enable-tclinterp + +# Each vim-xxx package is said to be a vim variant and contains only a vim +# binary built with some compile-time options. Makefile VARIANTS below are +# one-to-one with those packages with the exception of "vim-basic". In this +# Makefile vim-basic is used to built 4 packages: "vim", "vim-runtime", +# "vim-common", "vim-gui-common". "vim-tiny" is the only variant package not +# depending on vim-runtime. + +# vim-basic must be the last one +ifneq ($(DEB_HOST_GNU_SYSTEM),gnu) + VARIANTS+=vim-tiny + VARIANTS+=vim-ruby + VARIANTS+=vim-tcl + VARIANTS+=vim-gtk + VARIANTS_SKIP+=vim-lesstif + VARIANTS+=vim-perl + VARIANTS+=vim-python + VARIANTS+=vim-gnome + VARIANTS+=vim-full + VARIANTS+=vim-basic +else + VARIANTS+=vim-tiny + VARIANTS+=vim-ruby + VARIANTS+=vim-gtk + VARIANTS+=vim-python + VARIANTS_SKIP+=vim-lesstif + VARIANTS_SKIP+=vim-perl + VARIANTS_SKIP+=vim-gnome + VARIANTS_SKIP+=vim-tcl + VARIANTS_SKIP+=vim-full + VARIANTS+=vim-basic +endif +ifeq ($(origin VARIANT), command line) + VARIANTS = $(VARIANT) vim-basic +endif + +CFLAGS_vim-basic=$(CFLAGS) +CFGFLAGS_vim-basic=$(CFGFLAGS) $(OPTFLAGS) --without-x --enable-gui=no + +CFLAGS_vim-tiny=$(CFLAGS) $(TINYCFLAGS) +CFGFLAGS_vim-tiny=$(CFGFLAGS) $(TINYFLAGS) + +CFLAGS_vim-perl=$(CFLAGS) +CFGFLAGS_vim-perl=$(CFGFLAGS) $(OPTFLAGS) $(GUIFLAGS) $(PERLFLAGS) $(GTK2FLAGS) + +CFLAGS_vim-python=$(CFLAGS) +CFGFLAGS_vim-python=$(CFGFLAGS) $(OPTFLAGS) $(GUIFLAGS) $(PYTHONFLAGS) $(GTK2FLAGS) + +CFLAGS_vim-ruby=$(CFLAGS) +CFGFLAGS_vim-ruby=$(CFGFLAGS) $(OPTFLAGS) $(GUIFLAGS) $(RUBYFLAGS) $(GTK2FLAGS) + +CFLAGS_vim-tcl=$(CFLAGS) +CFGFLAGS_vim-tcl=$(CFGFLAGS) $(OPTFLAGS) $(GUIFLAGS) $(TCLFLAGS) $(GTK2FLAGS) + +CFLAGS_vim-gtk=$(CFLAGS) +CFGFLAGS_vim-gtk=$(CFGFLAGS) $(OPTFLAGS) $(GUIFLAGS) $(BASICFLAGS) $(GTK2FLAGS) + +CFLAGS_vim-gnome=$(CFLAGS) +CFGFLAGS_vim-gnome=$(CFGFLAGS) $(OPTFLAGS) $(GUIFLAGS) $(BASICFLAGS) $(GNOMEFLAGS) + +CFLAGS_vim-lesstif=$(CFLAGS) +CFGFLAGS_vim-lesstif=$(CFGFLAGS) $(OPTFLAGS) $(GUIFLAGS) $(BASICFLAGS) $(LESSTIFFLAGS) + +CFLAGS_vim-full=$(CFLAGS) +CFGFLAGS_vim-full=$(CFGFLAGS) $(OPTFLAGS) $(GUIFLAGS) $(GNOMEFLAGS) $(ALLINTERPFLAGS) + +NAME=vim +VERSION=7.0 +DEBVERSION=$(VERSION) +VIMCUR=$(NAME)$(subst .,,$(VERSION)) +SRCDIR=$(VIMCUR) +CHANGELOG=$(SRCDIR)/runtime/doc/version7.txt # latest version upstream changelog +MAIN_TARBALL=$(NAME)-$(VERSION).tar.bz2 +LANG_TARBALL=$(NAME)-$(VERSION)-lang.tar.gz +EXTRA_TARBALL=$(NAME)-$(VERSION)-extra.tar.gz +SOURCES = $(MAIN_TARBALL) $(LANG_TARBALL) $(EXTRA_TARBALL) +BASE_URL=ftp://ftp.vim.org/pub/vim +PER_VARIANT_FILES = install postinst prerm links preinst +LANGS += fr fr.ISO8859-1 fr.UTF-8 +LANGS += it it.ISO8859-1 it.UTF-8 +LANGS += pl pl.ISO8859-2 pl.UTF-8 +LANGS += ru + +DOT_IN_DEPS = debian/vim-runtime.install +DOT_IN_DEPS += debian/vim-runtime.install +DOT_IN_DEPS += debian/vim-common.install +DOT_IN_DEPS += debian/vim-gui-common.install +DOT_IN_DEPS += debian/vim-common.links +DOT_IN_DEPS += debian/vim-gui-common.links +DOT_IN_DEPS += debian/vim-runtime.links +DOT_IN_DEPS += debian/runtime/debian.vim + +# nothing to do per default +all: + +sources: + cd upstream/tarballs \ + && rm -f $(MAIN_TARBALL) $(EXTRA_TARBALL) $(LANG_TARBALL) \ + && wget $(BASE_URL)/unix/$(MAIN_TARBALL) \ + && wget $(BASE_URL)/extra/$(EXTRA_TARBALL) \ + && wget $(BASE_URL)/extra/$(LANG_TARBALL) + +export: clean + test -d ../build-area # this dir is in the svn repo + rm -rf ../build-area/vim-$(DEBVERSION) + mkdir ../build-area/vim-$(DEBVERSION) + svn export debian ../build-area/vim-$(DEBVERSION)/debian + svn export patches ../build-area/vim-$(DEBVERSION)/patches + svn export upstream ../build-area/vim-$(DEBVERSION)/upstream + for tb in $(MAIN_TARBALL) $(LANG_TARBALL) $(EXTRA_TARBALL) ; do \ + cp upstream/tarballs/$$tb \ + ../build-area/vim-$(VERSION)/upstream/tarballs/ ; \ + done + cd ../build-area && \ + [ -f vim_$(DEBVERSION).orig.tar.gz ] || \ + tar cvzf vim_$(DEBVERSION).orig.tar.gz \ + vim-$(DEBVERSION)/upstream/tarballs/ + cd ../build-area && \ + dpkg-source -b vim-$(DEBVERSION) + +extract: extract-stamp +extract-stamp: $(foreach s,$(SOURCES),extract-stamp-$(s)) + if [ ! -L vim -o "`readlink vim`" != "$(VIMCUR)" ]; then \ + ln -fs $(SRCDIR) vim; \ + fi + @for f in `find upstream/patches -type f -name '$(VERSION).*' -printf "%P\n" | grep -v .svn | sort -n` ; do\ + echo "applying upstream patch: $$f" ;\ + cat upstream/patches/$$f | patch -s -d$(SRCDIR) -p0 ;\ + done + quilt push -a + touch $@ + +# {{{1 hackish way of updating to latest unstable snapshot +updatesnapshot: + zipurl=`uscan --report | tail -2 | head -1` \ + && test ! -z "$$zipurl" \ + && zipbasename=`basename $$zipurl` \ + && wget -O upstream/tarballs/$$zipbasename $$zipurl \ + && noext=`echo $$zipbasename | sed 's/.zip//'` \ + && rulesversion=`echo $$noext | cut -c5-8` \ + && rulessnapshot=`echo $$noext | cut -c9-10` \ + && sedcmd="s/^VERSION=.*/VERSION=$$rulesversion/;s/^SNAPSHOT=.*/SNAPSHOT=$$rulessnapshot/" \ + && sed -i.bak "$$sedcmd" debian/rules \ + && sed -i.bak "1{s/+.*-/+$$rulesversion$$rulessnapshot-/};4{s/(......)/($$rulesversion$$rulessnapshot)/}" debian/changelog +# }}} + +extract-stamp-%.bz2: + bunzip2 -c upstream/tarballs/$(*).bz2 | tar -x + touch $@ + +extract-stamp-%.gz: + gunzip -c upstream/tarballs/$(*).gz | tar -x + touch $@ + +extract-stamp-%.zip: + unzip -d $(SRCDIR) upstream/tarballs/$(*).zip + touch $@ + +clean: $(foreach v,$(VARIANTS),clean-$(v)) + dh_testdir + dh_testroot + rm -f extract-stamp* build-stamp* install-stamp* + rm -f debian/helpztags.1 + - quilt pop -a + rm -rf $(SRCDIR) + rm -f vim + dh_clean + +clean-vim-basic: + for x in $(PER_VARIANT_FILES) ; do \ + rm -f debian/vim.$$x ; \ + done + for x in vim-gui-common.{install,links} vim-common.{install,links} \ + vim-runtime.install; do \ + rm -f debian/$$x; \ + done + rm -f $(DOT_IN_DEPS) + +clean-%: + for x in $(PER_VARIANT_FILES) ; do \ + rm -f debian/$*.$$x ; \ + done + rm -f debian/vim.links + rm -f debian/lintian/$* + +build: extract +build: build-stamp +build-stamp: $(foreach v,$(VARIANTS),build-stamp-$(v)) + $(MAKE) -C $(SRCDIR)/runtime/doc html # gen html docs (destroys tags) +# (re)generate the tags file +# $(SRCDIR)/src/vim-common -u /dev/null \ +# -c "helptags $(SRCDIR)/runtime/doc" -c quit + cd $(SRCDIR)/src/po; make vim.pot + touch $@ + +configure-stamp-%: + dh_testdir + @echo "*** DEBIAN *** CONFIGURING VARIANT $*" + $(MAKE) -C $(SRCDIR) clean + cd $(SRCDIR) \ + && make distclean \ + && CFLAGS="$(CFLAGS_$(*))" ./configure $(CFGFLAGS_$(*)) + touch $@ + +build-stamp-%: CURCFLAGS=$(CFLAGS_$*) +build-stamp-%: configure-stamp-% + dh_testdir + @echo "*** DEBIAN *** BUILDING VARIANT $*" + if [ "$*" = "vim-tiny" ]; then \ + patch -Np0 < debian/tiny/vimrc.tiny.diff; \ + fi + $(MAKE) -C $(SRCDIR) CFLAGS="$(CURCFLAGS)" + if [ "$*" = "vim-tiny" ]; then \ + patch -Rp0 < debian/tiny/vimrc.tiny.diff; \ + fi + mv $(SRCDIR)/src/vim $(SRCDIR)/src/$(subst -,.,$*) + touch $@ + +install: build +install: install-stamp +install-stamp: $(foreach v,$(VARIANTS),install-stamp-$(v)) + dh_testdir + dh_testroot + touch $@ + +install-stamp-vim-basic: export DH_OPTIONS=-pvim-runtime -pvim-common -pvim-gui-common -pvim -pvim-doc +install-stamp-vim-basic: DESTDIR=$(CURDIR)/debian/tmp +install-stamp-vim-basic: build-stamp-vim-basic $(DOT_IN_DEPS) + dh_testdir + dh_testroot + @echo "*** DEBIAN *** INSTALLING VARIANT vim-basic" + dh_clean -k + dh_installdirs + + # UPSTREAM INSTALLATION + + cp $(SRCDIR)/src/{vim.basic,vim} + $(MAKE) -C $(SRCDIR)/src DESTDIR=$(DESTDIR) installvimbin \ + installtutorbin \ + installruntime \ + installtools \ + install-icons \ + install-languages + if [ $(MAKETEST) = "yes" ]; then \ + $(MAKE) -C $(SRCDIR)/src DESTDIR=$(DESTDIR) test; \ + fi + + # DEBIAN INSTALLATION + + # According to #368754 and #323820, Russian manpages should be in + # /usr/share/man/ru (KOI8-R encoded) and man will handle the + # transcoding + mv $(DESTDIR)/usr/share/man/ru{.KOI8-R,} + # Remove this so the dh_install later doesn't fail + rm -rf $(DESTDIR)/usr/share/man/ru.UTF-8 + + # disabled, waiting for an update + #cp debian/vim-install $(DESTDIR)/usr/bin + mv $(DESTDIR)/usr/bin/{vim,vim.basic} # use variant name + # rm stuff handled by alternatives + rm -f $(DESTDIR)/usr/bin/{ex,view} + @for f in `find $(DESTDIR)/usr/share/man -name view.1 -o -name ex.1`; do \ + rm -f $$f; \ + done + # rm C part of maze (no longer working) + rm -f $(DESTDIR)/usr/share/vim/$(VIMCUR)/macros/maze/{*.c,Makefile} + # fix for CAN-2005-0069 + rm -f $(DESTDIR)/usr/share/vim/$(VIMCUR)/tools/vimspell.* + # helpztags manpage + pod2man -c "User Commands" -s 1 -q none -r "vim 7.0aa" \ + -d "September 2003" debian/helpztags debian/helpztags.1 + + # variant-related installations for package "vim" + # to be kept in sync with those in "install-stamp-%" target + for x in $(PER_VARIANT_FILES) ; do \ + sed -e "s:@PKG@:vim:;s:@VARIANT@:basic:" \ + -e "s:@DESTDIR@:debian/tmp/usr/bin:" \ + -e "s:@COMMON@:vim-common:" \ + debian/vim-variant.$$x > debian/vim.$$x ;\ + done + for L in $(LANGS); do \ + sed -e "s:\(.*\)@LANG_ALTS@:\1--slave \$$mandir/$$L/man1/\$$i.1.gz \$$i.$$L.1.gz \$$mandir/$$L/man1/vim.1.gz \\\\\n&:" \ + -i debian/vim.postinst; \ + done + sed -i "/@LANG_ALTS@/d" debian/vim.postinst + sed -e "s:@PKG@:vim:;s:@VARIANT@:basic:" \ + debian/lintian/vim-variant > debian/lintian/vim + + # Generate language-specific sections of + # vim-{runtime,common,gui-common}.install files + @for L in $(LANGS); do \ + echo debian/tmp/usr/share/man/$$L/man1/vimtutor.1 \ + usr/share/man/$$L/man1/ >>debian/vim-runtime.install; \ + done + + @for L in $(LANGS); do \ + echo debian/tmp/usr/share/man/$$L/man1/\* \ + usr/share/man/$$L/man1/ >>debian/vim-common.install; \ + done + + @for L in $(LANGS); do \ + echo debian/tmp/usr/share/man/$$L/man1/evim.1 \ + usr/share/man/$$L/man1/ >>debian/vim-gui-common.install; \ + done + + dh_installman + dh_install -X.svn --fail-missing + # adjust things for vim-gui-common + cp debian/vim-common/usr/share/man/man1/vim.1 \ + debian/vim-gui-common/usr/share/man/man1/gvim.1 + cp debian/vim-common/usr/share/man/man1/vimdiff.1 \ + debian/vim-gui-common/usr/share/man/man1/gvimdiff.1 + rm -f debian/vim-common/usr/share/man/man1/evim.1 + @for L in $(LANGS); do \ + cp debian/vim-common/usr/share/man/$$L/man1/vim.1 \ + debian/vim-gui-common/usr/share/man/$$L/man1/gvim.1; \ + cp debian/vim-common/usr/share/man/$$L/man1/vimdiff.1 \ + debian/vim-gui-common/usr/share/man/$$L/man1/gvimdiff.1; \ + rm -f debian/vim-common/usr/share/man/$$L/man1/evim.1; \ + done + # remove things that are in vim-runtime + rm -f debian/vim-common/usr/share/man/man1/vimtutor.1 + @for L in $(LANGS); do \ + rm -f debian/vim-common/usr/share/man/$$L/man1/vimtutor.1; \ + done + rmdir debian/vim-gui-common/usr/bin + # Generate language-specific sections of + # vim-{common,gui-common}.links files + @for L in $(LANGS); do \ + for p in rvim rview; do \ + echo usr/share/man/$$L/man1/vim.1 \ + usr/share/man/$$L/man1/$$p.1 >>debian/vim-common.links; \ + done; \ + done + + @for L in $(LANGS); do \ + for p in gview rgvim rgview; do \ + echo usr/share/man/$$L/man1/gvim.1 \ + usr/share/man/$$L/man1/$$p.1 >>debian/vim-gui-common.links; \ + done; \ + echo usr/share/man/$$L/man1/evim.1 \ + usr/share/man/$$L/man1/eview.1 >>debian/vim-gui-common.links; \ + done + dh_link + + # all excepts vim + dh_installchangelogs -Nvim + dh_installdocs + dh_installmenu + dh_installmime + + touch $@ + +# the other variants only include the binary +install-stamp-%: export DH_OPTIONS=-p$* +install-stamp-%: DESTDIR=$(CURDIR)/debian/$* +install-stamp-%: build-stamp-% + dh_testdir + dh_testroot + @echo "*** DEBIAN *** INSTALLING VARIANT $*" + dh_clean -k + dh_installdirs + + # variant-related installations + # to be kept in sync with those in "install-stamp-vim-basic" target + for x in $(PER_VARIANT_FILES) ; do \ + if [ "$*" = "vim-tiny" ]; then \ + sed -e "s:@PKG@:$*:" -e "s:@VARIANT@:$(patsubst vim-%,%,$*):" \ + -e "s:@DESTDIR@:$(SRCDIR)/src:" -e "s:@COMMON@:vim-common:" \ + debian/vim-variant.$$x > debian/$*.$$x ;\ + else \ + sed -e "s:@PKG@:$*:" -e "s:@VARIANT@:$(patsubst vim-%,%,$*):" \ + -e "s:@DESTDIR@:$(SRCDIR)/src:" -e "s:@COMMON@:vim-gui-common:" \ + debian/vim-variant.$$x > debian/$*.$$x ;\ + fi \ + done + sed -e "s:@PKG@:$*:;s:@VARIANT@:$(patsubst vim-%,%,$*):" \ + debian/lintian/vim-variant > debian/lintian/$* + for L in $(LANGS); do \ + sed -e "s:\(.*\)@LANG_ALTS@:\1--slave \$$mandir/$$L/man1/\$$i.1.gz \$$i.$$L.1.gz \$$mandir/$$L/man1/vim.1.gz \\\\\n&:" \ + -i debian/$*.postinst; \ + done + sed -i "/@LANG_ALTS@/d" debian/$*.postinst + # fake help installation for vim-tiny + if [ "$*" = "vim-tiny" ]; then \ + echo "debian/tiny/doc/ usr/share/vim/" >> debian/$*.install; \ + fi + dh_install -X.svn + dh_link + + touch $@ + +uninstall: + dh_testdir + dh_testroot + rm -f install-stamp* + dh_clean + +%: %.in + cat $< | sed 's/@VIMCUR@/$(VIMCUR)/' > $@ + +binary-indep: export DH_OPTIONS=-i +binary-indep: build install + dh_testdir + dh_testroot + dh_compress + dh_fixperms + dh_installdeb + dh_shlibdeps + dh_gencontrol + dh_md5sums + dh_builddeb + +binary-arch: build install +binary-arch: $(foreach v,$(VARIANTS),binary-arch-$(v)) + +binary-arch-vim-basic: export DH_OPTIONS=-pvim-common -pvim +binary-arch-vim-basic: + dh_testdir + dh_testroot + dh_strip + dh_compress + dh_fixperms + dh_installdeb + dh_shlibdeps + dh_gencontrol + dh_md5sums + dh_builddeb + +binary-arch-%: export DH_OPTIONS=-p$* $(foreach v,$(VARIANTS_SKIP),-N$(v)) +binary-arch-%: build install + dh_testdir + dh_testroot + dh_desktop + dh_strip + dh_compress + dh_fixperms + dh_installdeb + dh_shlibdeps + dh_gencontrol + dh_md5sums + dh_builddeb +binary: beginlog binary-indep binary-arch endlog +.PHONY: extract clean build install uninstall binary-indep binary-arch binary + +.PHONY: beginlog endlog +beginlog: + @echo "*** DEBIAN *** BUILD STARTED" + @echo "*** DEBIAN *** BUILDING VARIANTS: $(VARIANTS)" + @echo "*** DEBIAN *** SKIPPING VARIANTS: $(VARIANTS_SKIP)" +endlog: + @echo "*** DEBIAN *** BUILD COMPLETED" + +# vim: set foldmethod=marker: --- vim-7.0.orig/debian/control +++ vim-7.0/debian/control @@ -0,0 +1,244 @@ +Source: vim +Section: editors +Priority: optional +Maintainer: Debian VIM Maintainers +Uploaders: Norbert Tretkowski , Pierre Habouzit , Matthijs Mohlmann , Stefano Zacchiroli , Alexis Sukrieh , Pepijn de Langen , James Vega +Standards-Version: 3.7.2 +Build-Depends: debhelper (>= 4.2.21), dpkg (>> 1.7.0), dpkg-dev (>= 1.13.19), bzip2, perl (>= 5.6), libgpmg1-dev [!hurd-i386] | not+linux-gnu, libperl-dev (>= 5.6), tcl8.4-dev [!hurd-i386], python-dev, libxpm-dev, libncurses5-dev, ruby, ruby1.8-dev, libgtk2.0-dev (>= 2.2), libgnomeui-dev [!hurd-i386], quilt, make (>= 3.80+3.81.b4), libxt-dev +Build-Conflicts: libperl-dev (= 5.8.4-1) +XS-Vcs-Svn: svn://svn.debian.org/svn/pkg-vim/trunk/packages/vim + +Package: vim-common +Priority: important +Architecture: any +Depends: ${shlibs:Depends} +Conflicts: vim (<< 1:6.4-001+3), vim-gnome (<< 1:6.4-001+3), vim-gtk (<< 1:6.4-001+3), vim-lesstif (<< 1:6.4-001+3), vim-perl (<< 1:6.4-001+3), vim-python (<< 1:6.4-001+3), vim-ruby (<< 1:6.4-001+3), vim-tcl (<< 1:6.4-001+3), vim-full (<< 1:6.4-001+3) +Replaces: manpages-it (<= 0.3.4-3), manpages-pl (<=20060331-1), vim (<< 1:6.4-001+3), vim-gnome (<< 1:6.4-001+3), vim-gtk (<< 1:6.4-001+3), vim-lesstif (<< 1:6.4-001+3), vim-perl (<< 1:6.4-001+3), vim-python (<< 1:6.4-001+3), vim-ruby (<< 1:6.4-001+3), vim-tcl (<< 1:6.4-001+3), vim-full (<< 1:6.4-001+3), vim-runtime (<< 1:7.0-010+1) +Recommends: vim | vim-gnome | vim-gtk | vim-lesstif | vim-perl | vim-python | vim-ruby | vim-tcl | vim-full | vim-tiny +Description: Vi IMproved - Common files + Vim is an almost compatible version of the UNIX editor Vi. + . + Many new features have been added: multi level undo, syntax + highlighting, command line history, on-line help, filename + completion, block operations, folding, Unicode support, etc. + . + This package contains files shared by all non GUI-enabled vim + variants (vim and vim-tiny currently) available in Debian. + Examples of such shared files are: manpages, common executables + like vimtutor and xxd, and configuration files. + +Package: vim-gui-common +Priority: optional +Architecture: all +Conflicts: vim (<< 1:6.4-001+3), vim-gnome (<< 1:6.4-001+3), vim-gtk (<< 1:6.4-001+3), vim-lesstif (<< 1:6.4-001+3), vim-perl (<< 1:6.4-001+3), vim-python (<< 1:6.4-001+3), vim-ruby (<< 1:6.4-001+3), vim-tcl (<< 1:6.4-001+3), vim-full (<< 1:6.4-001+3) +Replaces: manpages-pl (<=20060331-1), vim (<< 1:6.4-001+3), vim-gnome (<< 1:6.4-001+3), vim-gtk (<< 1:6.4-001+3), vim-lesstif (<< 1:6.4-001+3), vim-perl (<< 1:6.4-001+3), vim-python (<< 1:6.4-001+3), vim-ruby (<< 1:6.4-001+3), vim-tcl (<< 1:6.4-001+3), vim-full (<< 1:6.4-001+3) +Recommends: vim-gnome | vim-gtk | vim-lesstif | vim-perl | vim-python | vim-ruby | vim-tcl | vim-full +Description: Vi IMproved - Common GUI files + Vim is an almost compatible version of the UNIX editor Vi. + . + Many new features have been added: multi level undo, syntax + highlighting, command line history, on-line help, filename + completion, block operations, folding, Unicode support, etc. + . + This package contains files shared by all GUI-enabled vim + variants (vim-perl, vim-gnome, ...) available in Debian. + Examples of such shared files are: icons, + desktop environments settings, and menu entries. + +Package: vim-runtime +Priority: optional +Architecture: all +Conflicts: vim-common (<< 1:6.4-007+2), vim (<< 1:6.4-001+3), vim-gnome (<< 1:6.4-001+3), vim-gtk (<< 1:6.4-001+3), vim-lesstif (<< 1:6.4-001+3), vim-perl (<< 1:6.4-001+3), vim-python (<< 1:6.4-001+3), vim-ruby (<< 1:6.4-001+3), vim-tcl (<< 1:6.4-001+3), vim-full (<< 1:6.4-001+3) +Replaces: manpages-pl (<=20060331-1), vim-common (<< 1:6.4-007+2), vim (<< 1:6.4-001+3), vim-gnome (<< 1:6.4-001+3), vim-gtk (<< 1:6.4-001+3), vim-lesstif (<< 1:6.4-001+3), vim-perl (<< 1:6.4-001+3), vim-python (<< 1:6.4-001+3), vim-ruby (<< 1:6.4-001+3), vim-tcl (<< 1:6.4-001+3), vim-full (<< 1:6.4-001+3) +Recommends: vim | vim-gnome | vim-gtk | vim-lesstif | vim-perl | vim-python | vim-ruby | vim-tcl | vim-full | vim-tiny +Enhances: vim-tiny +Description: Vi IMproved - Runtime files + Vim is an almost compatible version of the UNIX editor Vi. + . + Many new features have been added: multi level undo, syntax + highlighting, command line history, on-line help, filename + completion, block operations, folding, Unicode support, etc. + . + This package contains the architecture independent runtime + files, used, if available, by all vim variants available in + Debian. Example of such runtime files are: online documentation, + rules for language-specific syntax highlighting and indentation, + color schemes, and standard plugins. + +Package: vim-doc +Section: doc +Priority: optional +Architecture: all +Description: Vi IMproved - HTML documentation + Vim is an almost compatible version of the UNIX editor Vi. + . + Many new features have been added: multi level undo, syntax + highlighting, command line history, on-line help, filename + completion, block operations, folding, Unicode support, etc. + . + This package contains the HTML version of the online + documentation. + +Package: vim-tiny +Priority: important +Architecture: any +Depends: vim-common (= ${binary:Version}), ${shlibs:Depends} +Provides: editor +Description: Vi IMproved - enhanced vi editor - compact version + Vim is an almost compatible version of the UNIX editor Vi. + . + Many new features have been added: multi level undo, syntax + highlighting, command line history, on-line help, filename + completion, block operations, folding, Unicode support, etc. + . + This package contains a minimal version of vim compiled with no + GUI and a small subset of features in order to keep small the + package size. This package does not depend on the vim-runtime + package, but installing it you will get its additional benefits + (online documentation, plugins, ...). + +Package: vim +Priority: optional +Architecture: any +Depends: vim-common (= ${binary:Version}), vim-runtime (= ${source:Version}), ${shlibs:Depends} +Suggests: ctags, vim-doc, vim-scripts +Provides: editor +Conflicts: vim-doc (<< 1:6.4-001+3), vim-full (<< 1:6.4-001+3), vim-gnome (<< 1:6.4-001+3), vim-gtk (<< 1:6.4-001+3), vim-lesstif (<< 1:6.4-001+3), vim-perl (<< 1:6.4-001+3), vim-python (<< 1:6.4-001+3), vim-ruby (<< 1:6.4-001+3), vim-tcl (<< 1:6.4-001+3), vim-tiny (<< 1:6.4-001+3), vim-common (<< 1:6.4-001+3) +Replaces: vim-doc (<< 1:6.4-001+3), vim-full (<< 1:6.4-001+3), vim-gnome (<< 1:6.4-001+3), vim-gtk (<< 1:6.4-001+3), vim-lesstif (<< 1:6.4-001+3), vim-perl (<< 1:6.4-001+3), vim-python (<< 1:6.4-001+3), vim-ruby (<< 1:6.4-001+3), vim-tcl (<< 1:6.4-001+3), vim-tiny (<< 1:6.4-001+3) +Description: Vi IMproved - enhanced vi editor + Vim is an almost compatible version of the UNIX editor Vi. + . + Many new features have been added: multi level undo, syntax + highlighting, command line history, on-line help, filename + completion, block operations, folding, Unicode support, etc. + . + This package contain a version of vim compiled with a rather + standard set of features. See the other vim-* packages if you + need more (or less). + +Package: vim-perl +Priority: extra +Architecture: any +Depends: vim-gui-common (= ${source:Version}), vim-common (= ${binary:Version}), vim-runtime (= ${source:Version}), ${shlibs:Depends} +Suggests: cscope, vim-doc, ttf-bitstream-vera, gnome-icon-theme +Provides: gvim, editor +Conflicts: vim-full (<< 1:6.4-001+3), vim-gnome (<< 1:6.4-001+3), vim-gtk (<< 1:6.4-001+3), vim-lesstif (<< 1:6.4-001+3), vim-python (<< 1:6.4-001+3), vim-ruby (<< 1:6.4-001+3), vim-tcl (<< 1:6.4-001+3), vim-tiny (<< 1:6.4-001+3), vim-common (<< 1:6.4-001+3) +Replaces: vim (<= 1:6.3-068+1), vim-full (<< 1:6.4-001+3), vim-gnome (<< 1:6.4-001+3), vim-gtk (<< 1:6.4-001+3), vim-lesstif (<< 1:6.4-001+3), vim-python (<< 1:6.4-001+3), vim-ruby (<< 1:6.4-001+3), vim-tcl (<< 1:6.4-001+3), vim-tiny (<< 1:6.4-001+3) +Description: Vi IMproved - enhanced vi editor - with Perl support + Vim is an almost compatible version of the UNIX editor Vi. + . + Many new features have been added: multi level undo, syntax + highlighting, command line history, on-line help, filename + completion, block operations, folding, Unicode support, etc. + . + This package contains a version of vim compiled with Perl + scripting support and the GTK2 GUI. + +Package: vim-python +Priority: extra +Architecture: any +Depends: vim-gui-common (= ${source:Version}), vim-common (= ${binary:Version}), vim-runtime (= ${source:Version}), ${shlibs:Depends} +Suggests: cscope, vim-doc, ttf-bitstream-vera, gnome-icon-theme +Provides: gvim, editor +Conflicts: vim-full (<< 1:6.4-001+3), vim-gnome (<< 1:6.4-001+3), vim-gtk (<< 1:6.4-001+3), vim-lesstif (<< 1:6.4-001+3), vim-perl (<< 1:6.4-001+3), vim-ruby (<< 1:6.4-001+3), vim-tcl (<< 1:6.4-001+3), vim-tiny (<< 1:6.4-001+3), vim-common (<< 1:6.4-001+3) +Replaces: vim (<= 1:6.3-068+1), vim-full (<< 1:6.4-001+3), vim-gnome (<< 1:6.4-001+3), vim-gtk (<< 1:6.4-001+3), vim-lesstif (<< 1:6.4-001+3), vim-perl (<< 1:6.4-001+3), vim-ruby (<< 1:6.4-001+3), vim-tcl (<< 1:6.4-001+3), vim-tiny (<< 1:6.4-001+3) +Description: Vi IMproved - enhanced vi editor - with Python support + Vim is an almost compatible version of the UNIX editor Vi. + . + Many new features have been added: multi level undo, syntax + highlighting, command line history, on-line help, filename + completion, block operations, folding, Unicode support, etc. + . + This package contains a version of vim compiled with Python + scripting support and the GTK2 GUI. + +Package: vim-ruby +Priority: extra +Architecture: any +Depends: vim-gui-common (= ${source:Version}), vim-common (= ${binary:Version}), vim-runtime (= ${source:Version}), ${shlibs:Depends} +Suggests: cscope, vim-doc, ttf-bitstream-vera, gnome-icon-theme +Provides: gvim, editor +Conflicts: vim-full (<< 1:6.4-001+3), vim-gnome (<< 1:6.4-001+3), vim-gtk (<< 1:6.4-001+3), vim-lesstif (<< 1:6.4-001+3), vim-perl (<< 1:6.4-001+3), vim-python (<< 1:6.4-001+3), vim-tcl (<< 1:6.4-001+3), vim-tiny (<< 1:6.4-001+3), vim-common (<< 1:6.4-001+3) +Replaces: vim (<= 1:6.3-068+1), vim-full (<< 1:6.4-001+3), vim-gnome (<< 1:6.4-001+3), vim-gtk (<< 1:6.4-001+3), vim-lesstif (<< 1:6.4-001+3), vim-perl (<< 1:6.4-001+3), vim-python (<< 1:6.4-001+3), vim-tcl (<< 1:6.4-001+3), vim-tiny (<< 1:6.4-001+3) +Description: Vi IMproved - enhanced vi editor - with Ruby support + Vim is an almost compatible version of the UNIX editor Vi. + . + Many new features have been added: multi level undo, syntax + highlighting, command line history, on-line help, filename + completion, block operations, folding, Unicode support, etc. + . + This package contains a version of vim compiled with Ruby + scripting support and the GTK2 GUI. + +Package: vim-tcl +Priority: extra +Architecture: any +Depends: vim-gui-common (= ${source:Version}), vim-common (= ${binary:Version}), vim-runtime (= ${source:Version}), ${shlibs:Depends} +Suggests: cscope, vim-doc, ttf-bitstream-vera, gnome-icon-theme +Provides: gvim, editor +Conflicts: vim-full (<< 1:6.4-001+3), vim-gnome (<< 1:6.4-001+3), vim-gtk (<< 1:6.4-001+3), vim-lesstif (<< 1:6.4-001+3), vim-perl (<< 1:6.4-001+3), vim-python (<< 1:6.4-001+3), vim-ruby (<< 1:6.4-001+3), vim-tiny (<< 1:6.4-001+3), vim-common (<< 1:6.4-001+3) +Replaces: vim (<= 1:6.3-068+1), vim-full (<< 1:6.4-001+3), vim-gnome (<< 1:6.4-001+3), vim-gtk (<< 1:6.4-001+3), vim-lesstif (<< 1:6.4-001+3), vim-perl (<< 1:6.4-001+3), vim-python (<< 1:6.4-001+3), vim-ruby (<< 1:6.4-001+3), vim-tiny (<< 1:6.4-001+3) +Description: Vi IMproved - enhanced vi editor - with TCL support + Vim is an almost compatible version of the UNIX editor Vi. + . + Many new features have been added: multi level undo, syntax + highlighting, command line history, on-line help, filename + completion, block operations, folding, Unicode support, etc. + . + This package contains a version of vim compiled with TCL + scripting support and the GTK2 GUI. + +Package: vim-gtk +Priority: extra +Architecture: any +Depends: vim-gui-common (= ${source:Version}), vim-common (= ${binary:Version}), vim-runtime (= ${source:Version}), ${shlibs:Depends} +Suggests: cscope, vim-doc, ttf-bitstream-vera, gnome-icon-theme +Provides: gvim, editor +Conflicts: vim-full (<< 1:6.4-001+3), vim-gnome (<< 1:6.4-001+3), vim-lesstif (<< 1:6.4-001+3), vim-perl (<< 1:6.4-001+3), vim-python (<< 1:6.4-001+3), vim-ruby (<< 1:6.4-001+3), vim-tcl (<< 1:6.4-001+3), vim-tiny (<< 1:6.4-001+3), vim-common (<< 1:6.4-001+3) +Replaces: vim (<= 1:6.3-068+1), vim-full (<< 1:6.4-001+3), vim-gnome (<< 1:6.4-001+3), vim-lesstif (<< 1:6.4-001+3), vim-perl (<< 1:6.4-001+3), vim-python (<< 1:6.4-001+3), vim-ruby (<< 1:6.4-001+3), vim-tcl (<< 1:6.4-001+3), vim-tiny (<< 1:6.4-001+3) +Description: Vi IMproved - enhanced vi editor - with GTK2 GUI + Vim is an almost compatible version of the UNIX editor Vi. + . + Many new features have been added: multi level undo, syntax + highlighting, command line history, on-line help, filename + completion, block operations, folding, Unicode support, etc. + . + This package contains a version of vim compiled with support for + GTK2 GUI. + +Package: vim-gnome +Priority: extra +Architecture: any +Depends: vim-gui-common (= ${source:Version}), vim-common (= ${binary:Version}), vim-runtime (= ${source:Version}), ${shlibs:Depends} +Suggests: cscope, vim-doc, ttf-bitstream-vera, gnome-icon-theme +Provides: gvim, editor +Conflicts: vim-full (<< 1:6.4-001+3), vim-gtk (<< 1:6.4-001+3), vim-lesstif (<< 1:6.4-001+3), vim-perl (<< 1:6.4-001+3), vim-python (<< 1:6.4-001+3), vim-ruby (<< 1:6.4-001+3), vim-tcl (<< 1:6.4-001+3), vim-tiny (<< 1:6.4-001+3), vim-common (<< 1:6.4-001+3) +Replaces: vim (<= 1:6.3-068+1), vim-full (<< 1:6.4-001+3), vim-gtk (<< 1:6.4-001+3), vim-lesstif (<< 1:6.4-001+3), vim-perl (<< 1:6.4-001+3), vim-python (<< 1:6.4-001+3), vim-ruby (<< 1:6.4-001+3), vim-tcl (<< 1:6.4-001+3), vim-tiny (<< 1:6.4-001+3) +Description: Vi IMproved - enhanced vi editor - with GNOME2 GUI + Vim is an almost compatible version of the UNIX editor Vi. + . + Many new features have been added: multi level undo, syntax + highlighting, command line history, on-line help, filename + completion, block operations, folding, Unicode support, etc. + . + This package contains a version of vim compiled with support for + GNOME2 GUI. + +Package: vim-full +Priority: extra +Architecture: any +Depends: vim-gui-common (= ${source:Version}), vim-common (= ${binary:Version}), vim-runtime (= ${source:Version}), ${shlibs:Depends} +Suggests: cscope, vim-doc, ttf-bitstream-vera, gnome-icon-theme +Provides: gvim, editor +Conflicts: vim-gnome (<< 1:6.4-001+3), vim-gtk (<< 1:6.4-001+3), vim-lesstif (<< 1:6.4-001+3), vim-perl (<< 1:6.4-001+3), vim-python (<< 1:6.4-001+3), vim-ruby (<< 1:6.4-001+3), vim-tcl (<< 1:6.4-001+3), vim-tiny (<< 1:6.4-001+3), vim-common (<< 1:6.4-001+3) +Replaces: vim (<= 1:6.3-068+1), vim-gnome (<< 1:6.4-001+3), vim-gtk (<< 1:6.4-001+3), vim-lesstif (<< 1:6.4-001+3), vim-perl (<< 1:6.4-001+3), vim-python (<< 1:6.4-001+3), vim-ruby (<< 1:6.4-001+3), vim-tcl (<< 1:6.4-001+3), vim-tiny (<< 1:6.4-001+3) +Description: Vi IMproved - enhanced vi editor - full fledged version + Vim is an almost compatible version of the UNIX editor Vi. + . + Many new features have been added: multi level undo, syntax + highlighting, command line history, on-line help, filename + completion, block operations, folding, Unicode support, etc. + . + This package contains a version of vim compiled with support for + the GNOME2 GUI and scripting support for Perl, Python, Ruby, and + TCL. --- vim-7.0.orig/debian/vim-common.dirs +++ vim-7.0/debian/vim-common.dirs @@ -0,0 +1,5 @@ +/etc/ +/usr/bin/ +/usr/share/bug/ +/usr/share/vim/addons/plugin/ +/var/lib/vim/addons/ --- vim-7.0.orig/debian/FAQ +++ vim-7.0/debian/FAQ @@ -0,0 +1,7278 @@ +vim:tw=75:wrap:fo=tcqn2:sw=4:sts=4:et + +This Vim FAQ is created from the questions and answers posted to the +vim@vim.org user mailing list and the comp.editors newsgroup. There are +several ways to solve a problem in Vim. This FAQ gives one of those several +possibilities. You can explore the other ways using the information and +links given in this FAQ. The credit for the answers in this FAQ goes to +Peppe, Benji and numerous others. + +INDEX + +SECTION 1 - GENERAL INFORMATION + 1.1. What is Vim? + 1.2. Who wrote Vim? + 1.3. Is Vim compatible with Vi? + 1.4. What are some of the improvements of Vim over Vi? + 1.5. Is Vim free? + +SECTION 2 - RESOURCES + 2.1. Where can I learn more about Vim? + 2.2. Is there a mailing list available? + 2.3. Is there an archive available for the Vim mailing lists? + 2.4. Where can I get the Vim user manual in HTML/PDF/PS format? + 2.5. I have a "xyz" (some) problem with Vim. How do I determine it is a + problem with my setup or with Vim? + 2.6. Where can I report bugs? + 2.7. Where can the FAQ be found? + 2.8. What if I don't find an answer in this FAQ? + 2.9. I have a patch for implementing a Vim feature. Where do I send the + patch? + 2.10. I have a Vim tip or developed a new Vim + syntax/indent/filetype/compiler plugin or developed a new script + or a colorscheme. Is there a public website where I can upload + this? + +SECTION 3 - AVAILABILITY + 3.1. What is the latest version of Vim? (*Updated*) + 3.2. Where can I find the latest version of Vim? (*Updated*) + 3.3. What platforms does it run on? + 3.4. Where can I download the latest version of the Vim runtime files? + (*New*) + +SECTION 4 - HELP + 4.1. How do I use the help files? + 4.2. How do I search for a keyword in the Vim help files? + 4.3. I am getting an error message E123, what did I do wrong? + 4.4. Where can I read about the various modes in Vim? + 4.5. How do I generate the Vim help tags file after adding a new Vim + help file? + 4.6. Can I use compressed versions of the help files? + +SECTION 5 - EDITING A FILE + 5.1. I am currently editing a file in Vim. How do I load another file + into Vim? + 5.2. When I edit and save files, Vim creates a file with the same name + as the original file and a "~" character at the end. How do I stop + Vim from creating this file? + 5.3. How do I save the current file in another name (save as) and edit + a new file? + 5.4. How do I change the current directory to the directory of the + current file? + 5.5. How do I write a file without the line feed (EOL) at the end of + the file? + 5.6. How do I configure Vim to open a file at the last edited location? + 5.7. When editing a file in Vim, which is being changed by an external + application, Vim opens a warning window (like the confirm dialog) + each time a change is detected. How do I disable this warning? + 5.8. How do I edit a file whose name is under the cursor? + 5.9. How do I reload/re-edit the current file? + 5.10. When I save a file with Vim, the file permissions are changed. + How do I configure Vim to save a file without chaging the file + permissions? + 5.11 How do I autosave a file periodically? + 5.12. How do I open a file in read-only mode? + +SECTION 6 - EDITING MULTIPLE FILES + 6.1. How do I switch between files while editing multiple files in Vim? + 6.2. How do I configure Vim to autoload several files at once similar + to "work-sets" or "projects"? + 6.3. Is it possible to open multiple top level windows in a single + instance of Vim similar to Nedit or emacs? + 6.4. How do I open multiple files at once from within Vim? + 6.5. How do I open several windows in Vim by supplying command line + arguments? + 6.6. How do I browse/explore directories from within Vim? + 6.7. How do I edit files over a network using ftp/scp/rcp/http? + +SECTION 7 - BUFFERS + 7.1. I have made some modifications to a buffer. How do I edit another + buffer without saving the modified buffer and also without losing + the modifications? + 7.2. How do I configure Vim to auto-save a modified buffer when + switching to another buffer? + 7.3. How do I replace the buffer in the current window with a blank + buffer? + 7.4. Is there a keyboard shortcut to load a buffer by the buffer + number? + 7.5. How do I open all the current buffers in separate windows? + 7.6. How do I close (delete) a buffer without exiting Vim? + 7.7. I have several buffers opened with ":e filename". How do I close + one of the buffers without exiting Vim? + 7.8. When I use the command ":%bd" to delete all the buffers, not all + the buffers are deleted. Why? + 7.9. How do I display the buffer number of the current buffer/file? + 7.10. How do I delete a buffer without closing the window in which the + buffer is displayed? + 7.11. How do I map the tab key to cycle through and open all the + buffers? (*New*) + +SECTION 8 - WINDOWS + 8.1. What is the difference between a Vim window and a buffer? + 8.2. How do I increase the width of a Vim window? + 8.3. How do I zoom into or out of a window? (*New*) + 8.4. How do I execute an ex command on all the open buffers or open + windows or all the files in the argument list? (*Updated*) + +SECTION 9 - MOTION + 9.1. How do I jump to the beginning (first line) or end (last line) of + a file? + 9.2. In insert mode, when I press the key to go to command mode, + the cursor moves one character to the left (except when the cursor + is on the first character of the line). How do I prevent this? + 9.3. How do I configure Vim to maintain the horizontal cursor position + when scrolling with the , , etc keys? + 9.4. Some lines in a file are more than the screen width and they are + all wrapped. When I use the j, k keys to move from one line to the + next, the cursor is moved to the next line in the file instead of + the next line on the screen. How do I move from one screen line to + the next? + 9.5. What is the definition of a sentence, paragraph and section in + Vim? + 9.6. How do I jump to beginning or end of a sentence, paragraph or a + section? + 9.7. I have lines in a file that extends beyond the right extent of the + screen. How do I move the Vim view to the right to see the text + off the screen? + 9.8. How do I scroll two or more buffers simultaneously? + 9.9. When I use my arrow keys, Vim changes modes, inserts weird + characters in my document but doesn't move the cursor properly. + What's going on? + 9.10. How do I configure Vim to move the cursor to the end of the + previous line, when the left arrow key is pressed and the cursor + is currently at the beginning of a line? + 9.11. How do I configure Vim to stay only in insert mode (modeless + editing)? + 9.12. How do I save and use Vim marks across Vim sessions? + 9.13. How do I display some context lines when scrolling text? + +SECTION 10 - SEARCHING TEXT + 10.1. After I searched for a text with a pattern, all the matched text + stays highlighted. How do I turn off the highlighting + temporarily/permanently? + 10.2. How do I enter a carriage return character in a search pattern? + 10.3. How do I search for the character ^M? + 10.4. How can I search/replace characters that display as '~R', '~S', + etc.? + 10.5. How do I highlight all the non-printable characters in a file? + 10.6. How do I search for whole words in a file? + 10.7. How do I search for the current word under the cursor? + 10.8. How do I search for a word without regard to the case (uppercase + or lowercase)? + 10.9. How do I search for words that occur twice consecutively? + 10.10. How do I count the number of times a particular word occurs in a + buffer? + 10.11. How do I place the cursor at the end of the matched word when + searching for a pattern? + 10.12. How do I search for an empty line? + 10.13. How do I search for a line containing only a single character? + 10.14. How do I search and replace a string in multiple files? + 10.15. I am using the ":s" substitute command in a mapping. When a + search for a pattern fails, the map terminates. I would like the + map to continue processing the next command, even if the + substitute command fails. How do I do this? + 10.16. How do I search for the n-th occurrence of a character in a + line? + 10.17. How do I replace a tab (or any other character) with a hard + return (newline) character? + 10.18. How do I search for a character by its ASCII value? + 10.19. How do I search for long lines? + +SECTION 11 - CHANGING TEXT + 11.1. How do I delete all the trailing white space characters (SPACE + and TAB) at the end of all the lines in a file? + 11.2. How do I replace all the occurrences of multiple consecutive + space characters to a single space? + 11.3. How do I reduce a range of empty lines into one line only? + 11.4. How do I delete all blank lines in a file? How do I remove all + the lines containing only space characters? + 11.5. How do I copy/yank the current word? (*Updated*) + 11.6. How do I yank text from one position to another position within a + line, without yanking the entire line? + 11.7. When I yank some text into a register, how do I append the text + to the current contents of the register? + 11.8. How do I yank a complete sentence that spans over more than one + line? + 11.9. How do I yank all the lines containing a pattern into a buffer? + 11.10. How do I delete all the lines in a file that does not contain a + pattern? + 11.11. How do I add a line before each line with "pattern" in it? + 11.12. Is there a way to operate on a line if the previous line + contains a particular pattern? + 11.13. How do I execute a command on all the lines containing a + pattern? + 11.14. Can I copy the character above the cursor to the current cursor + position? + 11.15. How do I insert a blank line above/below the current line + without entering insert mode? + 11.16. How do I insert the name of current file into the current + buffer? + 11.17. How do I move the cursor past the end of line and insert some + characters at some columns after the end of the line? + 11.18. How to replace the word under the cursor (say: junk) with + "foojunkbar" in Vim? + 11.19. How do I replace a particular text in all the files in a + directory? + 11.20. I have some numbers in a file. How do I increment or decrement + the numbers in the file? + 11.21. How do I reuse the last used search pattern in a ":substitute" + command? + 11.22. How do I change the case of a string using the ":substitute" + command? + 11.23. How do I enter characters that are not present in the keyboard? + 11.24. Is there a command to remove any or all digraphs? + 11.25. In insert mode, when I press the backspace key, it erases only + the characters entered in this instance of insert mode. How do I + erase previously entered characters in insert mode using the + backspace key? + 11.26. I have a file which has lines longer than 72 characters + terminated with "+" and wrapped to the next line. How can I + quickly join the lines? + 11.27. How do I paste characterwise yanked text into separate lines? + 11.28. How do I change the case (uppercase, lowercase) of a word or + a character or a block of text? + 11.29. How do I enter ASCII characters that are not present in the + keyboard? + 11.30. How do I replace non-printable characters in a file? + 11.31. How do I remove duplicate lines from a buffer? + 11.32. How do I prefix all the lines in a file with the corresponding + line numbers? + 11.33. How do I exchange (swap) two characters or words or lines? + (*New*) + +SECTION 12 - COMPLETION IN INSERT MODE + 12.1. How do I complete words or lines in insert mode? + 12.2. How do I complete file names in insert mode? + 12.3. I am using CTRL-P/CTRL-N to complete words in insert mode. How do + I complete words that occur after the just completed word? + +SECTION 13 - TEXT FORMATTING + 13.1. How do I format a text paragraph so that a new line is inserted + at the end of each wrapped line? + 13.2. How do I format long lines in a file so that each line contains + less than 'n' characters? + 13.3. How do I join short lines to the form a paragraph? + 13.4. How do I format bulleted and numbered lists? + 13.5. How do I indent lines in insert mode? (*Updated*) + 13.6. How do I format/indent an entire file? + 13.7. How do I increase or decrease the indentation of the current + line? + 13.8. How do I indent a block/group of lines? + 13.9. When I indent lines using the > or < key, the standard 8-tabstops + are used instead of the current 'tabstop' setting. Why? + 13.10. How do I turn off the automatic indentation of text? + 13.11. How do I configure Vim to automatically set the 'textwidth' + option to a particular value when I edit mails? + 13.12. Is there a way to make Vim auto-magically break lines? + 13.13. I am seeing a lot of ^M symbols in my file. I tried setting the + 'fileformat' option to 'dos' and then 'unix' and then 'mac'. + None of these helped. How can I hide these symbols? + 13.14. When I paste some text into a Vim buffer from another + application, the alignment (indentation) of the new text is + messed up. How do I fix this? + 13.15. When there is a very long wrapped line (wrap is "on") and a line + doesn't fit entirely on the screen it is not displayed at all. + There are blank lines beginning with '@' symbol instead of + wrapped line. If I scroll the screen to fit the line the '@' + symbols disappear and the line is displayed again. What Vim + setting control this behavior? + 13.16. How do I convert all the tab characters in a file to space + characters? + 13.17. What Vim options can I use to edit text that will later go to a + word processor? + +SECTION 14 - VISUAL MODE + 14.1. How do I do rectangular block copying? + 14.2. How do I delete or change a column of text in a file? + 14.3. How do I apply an ex-command on a set of visually selected lines? + 14.4. How do I execute an ex command on a column of text selected in + Visual block mode? + 14.5. How do I select the entire file in visual mode? + 14.6. When I visually select a set of lines and press the > key to + indent the selected lines, the visual mode ends. How can I + reselect the region for further operation? (or) How do I + re-select the last selected visual area again? (*Updated*) + 14.7. How do I jump to the beginning/end of a visually selected region? + 14.8. When I select text with mouse and then press : to enter an ex + command, the selected text is replaced with the : character. How + do I execute an ex command on a text selected using the mouse + similar to the text selected using the visual mode? + 14.9. When I select a block of text using the mouse, Vim goes into + selection mode instead of Visual mode. Why? + +SECTION 15 - COMMAND-LINE MODE + 15.1. How do I use the name of the current file in the command mode or + an ex command line? + 15.2. How do I edit the text in the Vim command-line effectively? + 15.3. How do I switch from Vi mode to Ex mode? + 15.4. How do I copy the output from an ex-command into a buffer? + 15.5. When I press the tab key to complete the name of a file in the + command mode, if there are more than one matching file names, + then Vim completes the first matching file name and displays a + list of all matching filenames. How do I configure Vim to only + display the list of all the matching filenames and not complete + the first one? + 15.6. How do I copy text from a buffer to the command line and from the + command line to a buffer? + 15.7. How do I put a command onto the command history without executing + it? + +SECTION 16 - REMOTE EDITING + 16.1. How do I open a file with existing instance of gvim? What + happened to the Vim 5.x OpenWithVim.exe and SendToVim.exe files? + 16.2. How do I send a command to a Vim server to write all buffers to + disk? + 16.3. Where can I get the documentation about the Vim remote server + functionality? + +SECTION 17 - OPTIONS + 17.1. How do I configure Vim in a simple way? + 17.2. How do I toggle the value of an option? + 17.3. How do I set an option that affects only the current + buffer/window? + 17.4. How do I use space characters for a Vim option value? + 17.5. Can I add (embed) Vim option settings to the contents of a file? + 17.6. How do I display the line numbers of all the lines in a file? + 17.7. How do I change the width of the line numbers displayed using the + "number" option? (*Updated*) + 17.8. How do I display (view) all the invisible characters in a file? + 17.9. How do I configure Vim to always display the current line and + column number? + 17.10. How do I display the current Vim mode? + 17.11. How do I configure Vim to show pending/partial commands on the + status line? + 17.12. How do I configure the Vim status line to display different + settings/values? + 17.13. How do I configure Vim to display status line always? + 17.14. How do I make a Vim setting persistent across different Vim + invocations/instances/sessions? + 17.15. Why do I hear a beep (why does my window flash) about 1 second + after I hit the Escape key? + 17.16. How do I make the 'c' and 's' commands display a '$' instead of + deleting the characters I'm changing? + 17.17. How do I remove more than one flag using a single ":set" command + from a Vim option? + +SECTION 18 - MAPPING KEYS + 18.1. How do I know what a key is mapped to? + 18.2. How do list all the user-defined key mappings? + 18.3. How do I unmap a key? + 18.4. I am not able to create a mapping for the key. What is + wrong? + 18.5. How do I map the numeric keypad keys? + 18.6. How do I create a mapping that works only in visual mode? + 18.7. In a Vim script, how do I know which keys to use for my mappings, + so that the mapped key will not collide with an already used key? + 18.8. How do I map the escape key? + 18.9. How do I map a key to perform nothing? + 18.10. I want to use the Tab key to indent a block of text and + Shift-Tab key to unindent a block of text. How do I map the keys + to do this? This behavior is similar to textpad, visual studio, + etc. + 18.11. In my mappings the special characters like are not + recognized. How can I configure Vim to recognize special + characters? + 18.12. How do I use the '|' to separate multiple commands in a map? + 18.13. If I have a mapping/abbreviation whose ending is the beginning of + another mapping/abbreviation, how do I keep the first from + expanding into the second one? + 18.14. Why does it take a second or more for Vim to process a key, + sometimes when I press a key? + 18.15. How do I map a key to run an external command using a visually + selected text? + 18.16. How do I map the Ctrl-I key while still retaining the + functionality of the key? + +SECTION 19 - ABBREVIATIONS + 19.1. How do I auto correct misspelled words? (*New*) + 19.2. How do I create multi-line abbreviations? + 19.3. When my abbreviations are expanded, an additional space character + is added at the end of the expanded text. How do I avoid this + character? + 19.4. How do I insert the current date/time stamp into the file? + +SECTION 20 - RECORD AND PLAYBACK + 20.1. How do I repeat an editing operation (insertion, deletion, paste, + etc)? (*New*) + 20.2. How I record and repeat a set of key sequences? + 20.3. How do I edit/modify a recorded set of key sequences? + 20.4. How do I write recorded key sequences to a file? + 20.5. I am using register 0 to record my key sequences (i.e. q0 .... + q). In the recorded key sequences, I am yanking some text. After + the first replay of the recorded key sequence, I am no longer + able to play it back. + +SECTION 21 - AUTOCOMMANDS + 21.1. How do I execute a command when I try to modify a read-only file? + 21.2. How do I execute a command every time when entering a buffer? + 21.3. How do I execute a command every time when entering a window? + 21.4. From an autocmd, how can I determine the name of the file or the + buffer number for which the autocommand is executed? + 21.5. How do I automatically save all the changed buffers whenever Vim + loses focus? + 21.6. How do I execute/run a function when Vim exits to do some + cleanup? + +SECTION 22 - SYNTAX HIGHLIGHT + 22.1. How do I turn off/on syntax highlighting? + 22.2. How do I change the background and foreground colors used by Vim? + 22.3. How do I change the highlight colors to suit a dark/light + background? + 22.4. How do I change the color of the line numbers displayed when the + ":set number" command is used? + 22.5. How do I change the background color used for a Visually selected + block? + 22.6. How do I highlight the special characters (tabs, trailing spaces, + end of line, etc) displayed by the 'list' option? + 22.7. How do I specify a colorscheme in my .vimrc/.gvimrc file, so that + Vim uses the specified colorscheme everytime? + 22.8. Vim syntax highlighting is broken. When I am editing a file, some + parts of the file is not syntax highlighted or syntax highlighted + incorrectly. + 22.9. Is there a built-in function to syntax-highlight the + corresponding matching bracket? + 22.10. How do I turn off the C comment syntax highlighting? + 22.11. How do I add my own syntax extensions to the standard syntax + files supplied with Vim? + 22.12. How do I replace a standard syntax file that comes with the Vim + distribution with my own syntax file? + 22.13. How do I highlight all the characters after a particular column? + 22.14. How do I convert a source file (.c, .h, etc) with the Vim syntax + highlighting into a HTML file? + 22.15. How do I list the definition of all the current highlight + groups? (*New*) + +SECTION 23 - VIM SCRIPT WRITING + 23.1. How do I list the names of all the scripts sourced by Vim? + 23.2. How do I debug Vim scripts? + 23.3. How do I locate the script/plugin which sets a Vim option? + 23.4. I am getting some error/informational messages from Vim (possibly + when running a script), the messages are cleared immediately. How + do I display the messages again? + 23.5. How do I save and restore a plugin specific information across + Vim invocations? + 23.6. How do I start insert mode from a Vim function? + 23.7. How do I change the cursor position from within a Vim function? + 23.8. How do I check the value of an environment variable in the .vimrc + file? + 23.9. How do I check whether an environment variable is set or not from + a Vim function? + 23.10. How do I call/use the Vim built-in functions? + 23.11. I am using some normal mode commands in my Vim script. How do I + avoid using the user-defined mappings for these normal mode + commands and use the standard Vim functionality for these normal + mode commands? + 23.12. How do I get a visually selected text into a Vim variable or + register? + 23.13. I have some text in a Vim variable 'myvar'. I would like to use + this variable in a ":s" substitute command to replace a text + 'mytext'. How do I do this? + 23.14. A Vim variable (bno) contains a buffer number. How do I use this + variable to open the corresponding buffer? + 23.15. How do I store the value of a Vim option into a Vim variable? + 23.16. I have copied and inserted some text into a buffer from a Vim + function. How do I indent the inserted text from the Vim + function? + 23.17. How do I get the character under the cursor from a Vim script? + 23.18. How do I get the name of the current file without the extension? + 23.19. How do I get the basename of the current file? + 23.20. How do I get the output from a Vim function into the current + buffer? + 23.21. How do I call external programs from a Vim function? + 23.22. How do I get the return status of a program executed using the + ":!" command? + 23.23. How do I determine whether the current buffer is modified or + not? + 23.24. I would like to use the carriage return character in a normal + command from a Vim script. How do I specify the carriage return + character? + 23.25. How do I split long lines in a Vim script? + 23.26. When I try to "execute" my function using the "execute 'echo + Myfunc()'" command, the cursor is moved to the top of the + current buffer. Why? + 23.27. How do I source/execute the contents of a register? + 23.28. After calling a Vim function or a mapping, when I press the 'u' + key to undo the last change, Vim undoes all the changes made by + the mapping/function. Why? + 23.29. How can I call a function defined with s: (script local + function) from another script/plugin? + 23.30. Is it possible to un-source a sourced script? In otherwords, + reverse all the commands executed by sourcing a script. + 23.31. How do I get the character under the cursor? + +SECTION 24 - PLUGINS + 24.1. How do I set different options for different types of files? + 24.2. I have downloaded some Vim plugins, syntax files, indent files, + color schemes, filetype plugins, etc from the web. Where should I + copy these files so that Vim will find them? + 24.3. How do I extend an existing filetype plugin? + 24.4. How do I turn off loading the Vim plugins? + 24.5. How do I turn on/off loading the filetype plugins? + 24.6. How do I override settings made in a file type plugin in the + global ftplugin directory for all the file types? + 24.7. How do I disable the Vim directory browser plugin? + 24.8. How do I set the filetype option for files with names matching a + particular pattern or depending on the file extension? + +SECTION 25 - EDITING PROGRAM FILES + 25.1. How do I enable automatic indentation for C/C++ files? + 25.2. How do I configure the indentation used for C/C++ files? + 25.3. How do I turn off the automatic indentation feature? + 25.4. How do I change the number of space characters used for the + automatic indentation? + 25.5. I am editing a C program using Vim. How do I display the + definition of a macro or a variable? + 25.6. I am editing a C program using Vim. How do I jump to the + beginning or end of a code block from within the block? + 25.7. Is there a way to turn off the "//" comment auto-insertion + behavior for C++ files? If I'm sitting on a line beginning with + "//", then I open a new line above or below it, Vim automatically + inserts new "//" chars. + 25.8. How do I add the comment character '#' to a set of lines at the + beginning of each line? + 25.9. How do I edit a header file with the same name as the + corresponding C source file? + 25.10. How do I automatically insert comment leaders while typing + comments? + +SECTION 26 - QUICKFIX + 26.1. How do I build programs from Vim? + 26.2. When I run the make command in Vim I get the errors listed as the + compiler compiles the program. When it finishes this list + disappears and I have to use the :clist command to see the error + message again. Is there any other way to see these error + messages? + +SECTION 27 - FOLDING + 27.1. How do I extend the Vim folding support? + 27.2. When I enable folding by setting the 'foldmethod' option, all the + folds are closed. How do I prevent this? + 27.3. How do I control how many folds will be opened when I start + editing a file? + 27.4. How do I open and close folds using the mouse? + 27.5. How do I change the text displayed for a closed fold? + 27.6. How do I store and restore manually created folds across + different Vim invocations? + +SECTION 28 - VIM WITH EXTERNAL APPLICATIONS + 28.1. Can I run a shell inside a Vim window? + 28.2. How do I pass the word under the cursor to an external command? + 28.3. How do I get the output of a shell command into a Vim buffer? + 28.4. How do I pipe the contents of the current buffer to a external + command and replace the contents of the buffer with the output + from the command? + 28.5. How do I sort a section of my file? + 28.6. Is there a step-by-step guide for using Vim with slrn? + 28.7. How do I use Vim as a pager? + 28.8. How do I view Unix man pages from inside Vim? + 28.9. How do I change the diff command used by the Vim diff support? + 28.10. How do I use the Vim diff mode without folding? + +SECTION 29 - GUI VIM + 29.1. How do I create buffer specific menus? + 29.2. How do I change the font used by GUI Vim? + 29.3. When starting GUI Vim, how do I specify the location of the GVIM + window? + 29.4. How do I add a horizontal scrollbar in GVim? + 29.5. How do I make the scrollbar appear in the left side by default? + 29.6. How do I remove the Vim menubar? + 29.7. I am using GUI Vim. When I press the ALT key and a letter, the + menu starting with that letter is selected. I don't want this + behavior as I want to map the ALT- combination. How do I do + this? + 29.8. Is it possible to scroll the text by dragging the scrollbar so + that the cursor stays in the original location? + 29.9. How do I get gvim to start browsing files in a particular + directory when using the ":browse" command? + 29.10. For some questions, like when a file is changed outside of Vim, + Vim displays a GUI dialog box. How do I replace this GUI dialog + box with a console dialog box? + 29.11. I am trying to use GUI Vim as the editor for my xxx application. + When the xxx application launches GUI Vim to edit a file, the + control immediately returns to the xxx application. How do I + start GUI Vim, so that the control returns to the xxx + application only after I quit Vim? + 29.12. Why does the "Select Font" dialog doesn't show all the fonts + installed in my system? + 29.13. How do I use the mouse in Vim command-line mode? + 29.14. When I use the middle mouse button to scroll text, it pastes the + last copied text. How do I disable this behavior? + 29.15. How do I change the location and size of a GUI Vim window? + +SECTION 30 - VIM ON UNIX + 30.1. I am running Vim in a xterm. When I press the CTRL-S key, Vim + freezes. What should I do now? + 30.2. I am seeing weird screen update problems in Vim. What can I do to + solve this screen/display update problems? + 30.3. I am using the terminal/console version of Vim. In insertmode, + When I press the backspace key, the character before the cursor + is not erased. How do I configure Vim to do this? + 30.4. I am using Vim in a xterm. When I quit Vim, the screen contents + are restored back to the original contents. How do I disable + this? + 30.5. When I start Vim, it takes quite a few seconds to start. How do I + minimize the startup time? + 30.6. How can I make the cursor in gvim in unix stop blinking? + 30.7. How do I change the menu font on GTK Vim? + 30.8. How do I prevent from suspending Vim? + 30.9. When I kill the xterm running Vim, the Vim process continues to + run and takes up a lot of CPU (99%) time. Why is this happening? + 30.10. How do I get the Vim syntax highlighting to work in a Unix + terminal? + +SECTION 31 - VIM ON MS-WINDOWS + 31.1. In MS-Windows, CTRL-V doesn't start the blockwise visual mode. + What happened? + 31.2. When I press the CTRL-Y key, it acts like the CTRL-R key. How do + I configure Vim to treat CTRL-Y as CTRL-Y? + 31.3. How do I start GUI Vim in a maximized window always? + 31.4. After doing some editing operations, Vim freezes. The cursor + becomes an empty rectangle. I am not able enter any characters. + What is happening? + 31.5. I am using Windows XP, the display speed of maximized GVim is + very slow. What can I do to speed the display updates? + 31.6. What are the recommended settings for using Vim with cygwin? + 31.7. I am trying to use GNU diff with Vim diff mode. When I run the + diff from command line, it works. When I try to use the diff with + Vim it doesn't work. What should I do now? + 31.8. Is it possible to use Vim as an external editor for MS-Windows + Outlook email client? + 31.9. I am using Vim to edit HTML files. How do I start internet + explorer with the current file to preview the HTML file? + 31.10. I would like to use Vim with Microsoft Visual Studio. How do I + do this? + 31.11. Where do I place the _vimrc and _gvimrc files? + 31.12. Everytime I save a file, Vim warns about the file being changed + outside of Vim. Why? + +SECTION 32 - PRINTING + 32.1. How do I print a file along with line numbers for all the lines? + 32.2. How do I print a file with the Vim syntax highlighting colors? + +SECTION 33 - BUILDING VIM FROM SOURCE + 33.1. How do I build Vim from the sources on a Unix system? + 33.2. How do I install Vim in my home directory or a directory other + than the default installation directory in Unix? + 33.3. How do I build Vim from the sources on a MS-Windows system? + (*Updated*) + 33.4. The Vim help, syntax, indent files are missing from my Vim + installation. How do I install these files? + 33.5. I have built Vim from the source and installed the Vim package + using "make install". Do I need to keep the Vim source directory? + 33.6. How do I determine the Vim features which are enabled at compile + time? + 33.7. Can I build Vim without the GUI support? + 33.8. When building Vim on a Unix system, I am getting "undefined + reference to term_set_winsize' error. How do I resolve this + error? + 33.9. Vim configure keeps complaining about the lack of gtk-config + while trying to use GTK 2.03. This is correct, since in GTK 2 + they moved to using the generic pkg-config. I can get pkg-config + to list the various includes and libs for gtk, but for some + reason the configure script still isn't picking this up. + +SECTION 34 - VARIOUS + 34.1. How do I edit binary files with Vim? + 34.2. When I invoke Vim, I get error messages about illegal characters + in the viminfo file. What should I do to get rid of these + messages? + 34.3. How do I disable the visual error flash and the error beep? + 34.4. How do I display the ascii value of a character displayed in a + buffer? + 34.5. Can I use zero as a count for a Vim command? + 34.6. How do I disable the Vim welcome screen? + 34.7. How do I avoid the "hit enter to continue" prompt? + 34.8. How do I invoke Vim from command line to run a group of commands + on a group of files? + 34.9. How do I disable the viminfo feature? + +SECTION 35 - UNICODE + 35.1. Is it possible to create Unicode files using Vim? + 35.2. Which Vim settings are particularly important for editing Unicode + files? + 35.3. What is the 'encoding' option? + 35.4. How does Vim name the various Unicode encodings? + 35.5. How does Vim specify the presence or absence of a byte-order + mark? + 35.6. What is the 'fileencoding' option? + 35.7. What is the 'fileencodings' option? + 35.8. What is the 'termencoding' option? + 35.9. What is the 'bomb' option? + 35.10. Where can I find an example of a typical use of all these + options? + 35.11. How can I insert Unicode characters into a file using Vim? + 35.12. How can I know which digraphs are defined and for which + characters? + + +============================================================================= + +SECTION 1 - GENERAL INFORMATION + + +1.1. What is Vim? + +Vim stands for Vi IMproved. It used to be Vi IMitation, but there are so +many improvements that a name change was appropriate. Vim is a text editor +which includes almost all the commands from the Unix program "Vi" and a lot +of new ones. All commands can be given with the keyboard. This has the +advantage that you can keep your fingers on the keyboard and your eyes on +the screen. For those who want it, there is mouse support and a GUI version +with scrollbars and menus. + +Vim is an editor, not a word processor. A word processor is used mainly to +do layout of text. This means positioning it, changing the way it appears +on output. More often than not, the final document is meant to be printed +or typeset or what have you, in order to present it in a pleasing manner to +others. Examples of word processors are Microsoft Word, WordPerfect, +FrameMaker, and AmiPro. + +An editor is simply for entering text. Any typesetting or laying out of the +document is secondary. With an editor, one's main concern is entering text, +not making the text look good. Examples of editors other than Vim and Vi +are Emacs, Crisp, Brief, and xedit. And Notepad. + +For more information, read + + :help intro + + +1.2. Who wrote Vim? + +Most of Vim was written by Bram Moolenar, with contributions from too many +people to mention here. See ":h credits" for a complete list. + +Vim is based on Stevie, worked on by Tim Thompson, Tony Andrews and G.R. +(Fred) Walter. + +For more information, read + + :help author + + +1.3. Is Vim compatible with Vi? + +Yes. Vim is very much compatible with Vi. You can use the "-C" +command-line flag to start Vim in Vi compatible mode: + + $ vim -C + +You can also use: + + $ vim -u NONE + +You can also set the 'compatible' option to enable Vi compatibility: + + :set compatible + +For more information, read + + :help -C + :help 'compatible' + :help compatible-default + + +1.4. What are some of the improvements of Vim over Vi? + +A short summary of the improvements of Vim over vi is listed below. The +list shows that Vim is a thoroughly modern and feature-packed editor. +Standard features of modern editors are implemented, and there is an equal +emphasis on general power-user features and features for programmers. + +Features to modernise Vi: + + Multi-level undo + Allows you to set the number of times you can undo your changes in a + file buffer. You can also redo an undone change. + Multiple windows and buffers + Each file can be displayed in its own window. You can move easily from + one window to another. Each file opened during a Vim session also has + an associated buffer and you can easily jump from one to the other. + Flexible insert mode + Vim allows you to use the arrow keys while in insert mode to move + around in the file. No more hitting , moving around, then hitting + `i' or `a'. + Macros + Vim has a facility which allows you to record a sequence of typed + characters and repeat them any number of times. + Visual mode + You can highlight sections of text and execute operations on this + section of text only. + Block operators + Allow selection and highlighting of rectangular blocks of text in + order do execute specific operations on them. + Online help system + You can easily find help on any aspect of using Vim. Help is displayed + in its own window. + Command-line editing and history + History allows you to use the arrow keys to repeat or search for a + command that has already been typed. Allows you to match the beginning + of a command with the beginning of another similar command in the + history buffer. You can also edit a command to correct typos or change + a few values. + Command line completion. + Using the key, you can complete commands, options, filenames, + etc. as needed. + Horizontal scrolling. + Long lines can be scrolled horizontally (with or without the GUI). + +Advanced user features: + + Text formatting. + With two keystrokes, you can format large sections of text, without + the use of external programs. + Word completion in Insert mode + Vim can complete words while you are typing, by matching the current + word with other similar words in the file. + Jump tags + Just like in an internet browser, you can jump back to previous parts + of the text you were editing, and then forward again. Your brain is + thus free to edit instead of navigate. + Automatic commands + Commands automatically executed when reading or writing a file, + jumping to another buffer, etc. + Viminfo + Allows storing of the command line history, marks and registers in a + file to be read on startup. Therefore, you can recall old search + patterns, macros, etc., in a new Vim session. + Mouse support + The mouse is supported in an xterm and for MS-DOS. It can be used to + position the cursor, select the visual area, paste a register, etc. + Graphical User Interface (GUI) + Just like any modern editor. Also, it's very easy to add your own + menus. Of course, console vim is still supported, and very widely + used. + Scripting language + Vim has a powerful scripting language so new commands can be created. + You can also use Perl, Python, TCL and Ruby to achieve the same thing! + Plugins + Extra functionality implemented via vim commands (regular commands or + the scripting language) that is automatically loaded on startup. + Examples: file explorer, network editing. More are being developed + and shared on VimOnline all the time. + Syntax highlighting for many programming languages + Syntax highlighting for hundreds of programming languages is + supported. Support for others can be added. + Extended regular expressions + Vim supports extended regular expressions which are similar in + functionality to that of perl regular expressions. + +Programming performance features: + + Edit-compile-edit speedup + You can compile within Vim and automatically jump to the location of + errors in the source code. + Indenting for many programming languages + C, C++, Java, Perl, XML and many other languages can be automatically + indented by vim while you type. Support for others can be added. + Searching for words in include files + Vim allows you to search for a match of the word under the cursor in + the current and included files. + Advance text objects + Instantly select, or delete, or copy, or indent, or format, or change + case, or ... to all the text between ( and ), or { and }, or < and >, + or [ and ]. Or a word, sentence, or paragraph. Very powerful. + Folding + Certain parts of the text can be "folded" away. The best example is + the body of a function. You can get an overview of the code, and then + open the fold of the function whose detail you need to see. + ctags and cscope integration + Using these two powerful programs, you can jump to a definition of a + function from a calling instance of it, and use other tricks to + navigate source code. + +For more information, read + + :help vi-differences + + +1.5. Is Vim free? + +Vim is Charityware. There are no restrictions on using or copying Vim, but +the author encourages you to make a donation to charity. A document +explaining how to do so is included in the distribution. + +For more information, read + + :help copyright + + +============================================================================= + +SECTION 2 - RESOURCES + + +2.1. Where can I learn more about Vim? + +You can post your Vim questions to the vim@vim.org mailing list. You can +post your Vim development related questions to the vim-dev@vim.org mailing +list. Vim does not have a newsgroup of its own. But the appropriate +newsgroup to post to is comp.editors. + +"VimOnline" is a web page that serves as a de facto homepage for vim, +although the main purpose of it is to gather tips and scripts from +everywhere. Get involved! The URL is vim.sourceforge.net or vim.sf.net. + +Finally, read the Vi FAQ: + + http://www.faqs.org/faqs/editor-faq/vi/part1/index.html + +For more information, read + + :help mail-list + :help internet + + +2.2. Is there a mailing list available? + +There are several: + + NAME DESCRIPTION + + vim-announce Announcements of new releases + vim General discussion + vim-dev Patches, bug reports, development discussions + vim-mac Macintosh discussion + vim-fr General discussion in French + vim-multibyte Multibyte development issues + vim-vms Development on VMS + +Of these, only vim and vim-dev are of general interest. vim-announce is +read-only to most people, and its messages are sent to the other lists as +well. The remaining four are very low volume. + +To subscribe: send an email to -subscribe@vim.org +To unsubscribe: send an email to -unsubscribe@vim.org +To get help: send an email to -help@vim.org + + +2.3. Is there an archive available for the Vim mailing lists? + +Yes. Visit http://www.yahoogroups.com/list/, where name is one of: +vimannounce, vim, vimdev, vim-fr, vim-mac, vim-multibyte, vim-vms. + +Alternatively, visit www.gmane.org to find out about GMANE, which allows +you to access the mailing lists as though they were newsgroups. This +offers some convenience to those who wish to browse the history or casually +observe the current threads. + + +2.4. Where can I get the Vim user manual in HTML/PDF/PS format? + +You can download the HTML/PDF/PS format of the Vim user manual from: + + http://vimdoc.sourceforge.net/ + + +2.5. I have a "xyz" (some) problem with Vim. How do I determine it is a + problem with my setup or with Vim? + +First, you have to determine that the problem is not with your .vimrc or +.gvimrc or system vimrc or your personal plugin files or in any of your +setup files. To do this, use + + $ vim -N -u NONE -U NONE + +This will start Vim in 'nocompatible" mode and will not source your +personal .vimrc and .gvimrc files. It will also not load your personal +plugins. In this invocation of Vim, try to reproduce your problem. If you +are not able to reproduce the problem, then the problem is related to some +setting in one of your local setup files or plugins. To locate the problem +in your setup files, you have to use trial and error and try commenting out +the lines in your setup files one by one. You can also use the -V command +line argument to Vim to get more debug information and analyze the problem: + + $ vim -V2 + +You can increase the value passed to the -V argument to get more debug +information. + +For more information, read + + :help -u + :help -U + :help -N + :help -V + :help 'verbose' + :help :verbose + :help set-verbose + + +2.6. Where can I report bugs? + +First collect the required information using the following command: + + :source $VIMRUNTIME/bugreport.vim + +Now send the resulting text from the above command to the bugs@vim.org +e-mail address. + +The Vim Development mailing list (see above) is a good place to discuss +general bugs. If the bug you find is with syntax highlighting or some +other "added feature" (i.e. not directly programmed into vim), attempt to +inform the maintainer of that feature. + +For more information, read + + :help bug-reports + + +2.7. Where can the FAQ be found? + +The FAQ can be found at VimOnline (vim.sf.net). Other places will be +decided in the future. + + +2.8. What if I don't find an answer in this FAQ? + +This FAQ covers mainly Vim-specific questions. You may find more +information suitable for most Vi clones by reading the Vi FAQ. It is posted +regularly on comp.editors. You can also find a copy at + + http://www.faqs.org/faqs/editor-faq/vi/part1/index.html + +Also, since Vim has gathered so many features in the last few years, +successfully documenting the frequently asked questions here is a +near-impossible task. To make it possible, please email the maintainer if +you have a good question. A good question is one that you've tried to +answer yourself (remember, Vim has great documentation) but struggled. + + +2.9. I have a patch for implementing a Vim feature. Where can I send this + patch? + +You can send your patches to the Vim developer mailing list +vim-dev@vim.org. + +For more information, read + + :help vim-dev + + +2.10. I have a Vim tip or developed a new Vim + syntax/indent/filetype/compiler plugin or developed a new script or a + colorscheme. Is there a public website where I can upload this? + +Yes. You can use the Vim Online website to upload your plugins/scripts, +colorschemes, tips, etc. The site is at http://vim.sourceforge.net + + +============================================================================= + +SECTION 3 - AVAILABILITY + + +3.1. What is the latest version of Vim? + +The latest version of Vim is 6.2 released on 1st June 2003. + +A history of previously released versions of Vim is below: + +Version 6.1 24th March 2002 +Version 6.0 27th September, 2001 +Version 5.8 31st May, 2001 +Version 5.7 24th June, 2000 +Version 5.6 16th January, 2000 +Version 5.5 21st September, 1999 +Version 5.4 26th July, 1999 +Version 5.3 31st August, 1998 +Version 5.2 24th August, 1998 +Version 5.1 7th April, 1998 +Version 5.0 19th February, 1998 +Version 4.6 13th March,1997 +Version 4.5 17th October, 1996 +Version 4.2 5th July,1996 +Version 4.0 21st May, 1996 +Version 3.0 16th August, 1994 +Version 2.0 21st December, 1993 +Version 1.27 23rd April, 1993 +Version 1.17 21st April, 1992 + + +3.2. Where can I find the latest version of Vim? + +You can download the sources for the latest version of Vim from the +VimOnline website. The URL for this site is +http://vim.sourceforge.net/download.php. + + +3.3. What platforms does it run on? + +All Unix platforms. +All Windows platforms. +Amiga, Atari, BeOS, DOS, Macintosh, MachTen, OS/2, RiscOS, VMS. + + +3.4. Where can I download the latest version of the Vim runtime files? + +You can download the latest version of the Vim runtime files (syntax files, +filetype plugins, compiler files, color schemes, documentation, indentation +files and keymaps) from the Vim ftp site from the +ftp://ftp.vim.org/pub/vim/runtime directory. + + +============================================================================= + +SECTION 4 - HELP + + +4.1. How do I use the help files? + +Help can be found for all functions of Vim. In order to use it, use the +":help" command. This will bring you to the main help page. On that first +page, you will find explanations on how to move around. Basically, you move +around in the help pages the same way you would in a read-only document. +You can jump to specific subjects by using tags. This can be done in two +ways: + + * Use the "" command while standing on the name of a command or + option. This only works when the tag is a keyword. "" + and "g" work just like "". + * use the ":tag " command. This works with all characters. + +Use "" to jump back to previous positions in the help files. Use +":q" to close the help window. + +If you want to jump to a specific subject on the help pages, use ":help +{subject}". If you don't know what to look for, try ":help index" to get a +list of all available subjects. Use the standard search keys to locate the +information you want. You can abbreviate the ":help" command as ":h". + +For more information, read + + :help online-help + + +4.2. How do I search for a keyword in the Vim help files? + +You can press the CTRL-D key after typing the help keyword to get a list of +all the help keywords containing the supplied pattern. You can also use the +meta characters like *, \+, etc to specify the help search pattern: + + :help init + :help str*() + :help '*indent + +You can press the Tab key after typing a partial help keyword to expand to +the matching keyword. You can continue to press the Tab key to see other +keyword matches. + +From the help window, you can use the ":tag" command to search for +keywords. For example, + + :tselect /window + +This command will list all the help keywords containing the text "window". +You can select one from the list and jump to it. + +You can use the ":helpgrep" command to search for the given text in all the +help files. The quickfix window will be opened with all the matching lines. + +For more information, read + + :help c_CTRL-D + :help c_ + :help :tselect + :help :help + :help :helpgrep + + +4.3. I am getting an error message E123, what did I do wrong? + +You can get more information about the error and the error message using: + + :help E123 + +For more information, read + + :help error-messages + + +4.4. Where can I read about the various modes in Vim? + +You can get information about the different modes in Vim by reading + + :help vim-modes + + +4.5. How do I generate the Vim help tags file after adding a new Vim help + file? + +You can use the ":helptags" command to regenerate the Vim help tag file. +For example: + + :cd $VIMRUNTIME/doc + :helptags . + +For more information, read + + :help :helptags + :help add-local-help + + +4.6. Can I use compressed versions of the help files? + +You can compress the help files and still be able to view them with Vim. +This makes accessing the help files a bit slower and requires the "gzip" +utility. Follow these steps to compress and use the Vim help files: + +- Compress all the help files using "gzip doc/*.txt". + +- Edit the "doc/tags" file and change the ".txt" to ".txt.gz" using + :%s=\(\t.*\.txt\)\t=\1.gz\t= + +- Add the following line to your vimrc: + set helpfile={dirname}/help.txt.gz + +Where {dirname} is the directory where the help files are. The gzip.vim +plugin supplied with the standard Vim distribution will take care of +decompressing the files. You must make sure that $VIMRUNTIME is set to +where the other Vim files are, when they are not in the same location as +the compressed "doc" directory. + +For more information, read + + :help gzip-helpfile + :help 'helpfile' + :help gzip + :help $VIMRUNTIME + + +============================================================================= + +SECTION 5 - EDITING A FILE + + +5.1. I am currently editing a file in Vim. How do I load another file into + Vim? + +There are several ways to load another file for editing. The simplest is to +use the ":e" command: + + :e + +For more information, read + + :help usr_07 + :help edit-files + + +5.2. When I edit and save files, Vim creates a file with the same name as + the original file and a "~" character at the end. How do I stop Vim + from creating this file? + +You have set the 'backup' option, so Vim creates a backup file when saving +the original file. You can stop Vim from creating the backup file, by +clearing the option: + + :set nobackup + +Note that, by default this option is turned off. You have explicitly +enabled the 'backup' option in one of the initialization files. You may +also have to turn off the 'writebackup' option: + + :set nowritebackup + +For more information, read + + :help 07.4 + :help backup-table + :help 'backup' + :help 'writebackup' + :help 'backupskip' + :help 'backupdir' + :help 'backupext' + :help 'backupcopy' + :help backup + + +5.3. How do I save the current file in another name (save as) and edit a + new file? + +You can use the ":saveas" command to save the current file in another name: + + :saveas + +Alternatively, you can also do: + + :w + :edit # + +You can also use the ":file" command, followed by ":w" command: + + :file + :w + +For more information, read + + :help :saveas + :help :file_f + :help :w + + +5.4. How do I change the current directory to the directory of the current + file? + +You can use the following command to change the current directory to the +directory of the current file: + + :cd %:p:h + +To automatically change the current directory to the directory of the +current file, use the following autocmd: + + :autocmd BufEnter * cd %:p:h + +For more information, read + + :help :cd + :help :lcd + :help filename-modifiers + :help autocommand + + +5.5. How do I write a file without the line feed (EOL) at the end of the + file? + +You can turn off the 'eol' option and turn on the 'binary' option to write +a file without the EOL at the end of the file: + + :set binary + :set noeol + :w + +For more information, read + + :help 'endofline' + :help 'binary' + :help 23.4 + + +5.6. How do I configure Vim to open a file at the last edited location? + +Vim stores the cursor position of the last edited location for each buffer +in the '"' register. You can use the following autocmd in your .vimrc or +.gvimrc file to open a file at the last edited location: + + au BufReadPost * if line("'\"") > 0 && line("'\"") <= line("$") | + \ exe "normal g'\"" | endif + +For more information, read + + :help '" + :help last-position-jump + + +5.7. When editing a file in Vim, which is being changed by an external + application, Vim opens a warning window (like the confirm dialog) each + time a change is detected. How do I disable this warning? + +You can set the 'autoread' option to configure Vim to automatically read +the file again when it is changed outside of Vim: + + :set autoread + +You can also use the following autocommand: + + autocmd FileChangedShell * + \ echohl WarningMsg | + \ echo "File has been changed outside of vim." | + \ echohl None + +For more information, read + + :help 'autoread' + :help FileChangedShell + :help timestamp + :help :checktime + + +5.8. How do I edit a file whose name is under the cursor? + +You can use the gf command to edit a file whose name is under the cursor. +You can use the CTRL-W f command to edit the file in a new window. + +For more information, read + + :help gf + :help CTRL-W_f + :help 'isfname' + :help 'path' + :help 'suffixesadd' + :help 'includeexpr' + + +5.9. How do I reload/re-edit the current file? + +You can use the ":edit" command, without specifying a file name, to reload +the current file. If you have made modifications to the file, you can use +":edit!" to force the reload of the current file (you will lose your +modifications). + +For more information, read + + :help :edit + :help :edit! + :help 'confirm' + + +5.10. When I save a file with Vim, the file permissions are changed. + How do I configure Vim to save a file without chaging the file + permissions? + +This may happen, if the 'backupcopy' option is set to 'no' or 'auto'. Note +that the default value for this option is set in such a way that this will +correctly work in most of the cases. If the default doesn't work for you, +try setting the 'backupcopy' option to 'yes' to keep the file permission +when saving a file: + + :set backupcopy=yes + +This applies, only if you have configured Vim to make a backup whenever +overwriting a file. By default, Vim will not backup files. + +For more information, read + + :help 'backupcopy' + :help backup + :help 'backup' + :help 'writebackup' + + +5.11 How do I autosave a file periodically? + +Vim does not support auto-saving a file periodically. + +For more information, read + + :help 'updatetime' + :help CursorHold + :help swap-file + + +5.12. How do I open a file in read-only mode? + +You can open a file in read-only mode using the ":view" command: + + :view + +This command sets the 'readonly' option for the opened buffer. You can also +use the "-R" command-line option to open a file in read-only mode: + + $ vim -R + +You can also use the symbolic link "view" to open a file in read-only mode: + + $ view + +For more information, read + + :help 07.6 + :help 'readonly' + :help 'modifiable' + :help :view + :help :sview + :help view + :help -R + :help -M + + +============================================================================= + +SECTION 6 - EDITING MULTIPLE FILES + + +6.1. How do I switch between files while editing multiple files in Vim? + +There are several ways to switch between multiple files. You can use the +":buffer" command to switch between multiple files. For example, + + :buffer file1 + :buffer file2 + +You can also use the CTRL-^ key to switch between buffers. By specifying a +count before pressing the key, you can edit the buffer with that number. +Without the count, you can edit the alternate buffer by pressing CTRL-^ + +You can also use the ":e #" command to edit a particular buffer: + + :e #5 + +For more information, read + + :help edit-files + :help :buffer + :help CTRL-^ + :help alternate-file + :help 22.4 + :help 07.3 + + +6.2. How do I configure Vim to autoload several files at once similar to + "work-sets" or "projects"? + +You can use the ":mksession" and ":mkview" commands to achieve this. The +mksession command creates a Vim script that restores the current editing +session. You can use the ":source" command to source the file produced by +the mksession command. The mkview command creates a Vim script that +restores the contents of the current window. You can use the ":loadview" +command to load the view for the current file. + +For more information, read + + :help 21.4 + :help 21.5 + :help views-sessions + :help 'sessionoptions' + :help :mksession + :help :source + :help v:this_session + :help :mkview + :help :loadview + :help 'viewdir' + :help buffers + + +6.3. Is it possible to open multiple top level windows in a single instance + of Vim similar to Nedit or emacs? + +No. It is currently not possible to open multiple top-level windows in a +single instance of Vim. This feature is in the todo list. + + +6.4. How do I open multiple files at once from within Vim? + +There are several ways to open multiple files at once from within Vim. You +can use the ":next" command to specify a group of file: + + :next f1.txt f2.txt + :next *.c + +You can use the :args command to specify a group of files as argument: + + :args f1.txt f2.txt + :args *.c + +For more information, read + + :help :next + :help :args_f + :help argument-list + + +6.5. How do I open several windows in Vim by supplying command line + arguments? + +You can use the -o and -O Vim command line arguments to open multiple +horizontally or vertically split windows. For example: + + $ vim -o2 + $ vim -O2 + +For more information, read + + :help -o + :help -O + :help startup-options + + +6.6. How do I browse/explore directories from within Vim? + +You can use the explorer.vim plugin, supplied with the standard Vim +package, to browse/explore directories from within Vim. You can start the +file explorer using one of the following commands: + + :e + :Explore + :SExplore + +From the file explorer, you can browse through directories, rename, delete +and edit files. + +For more information, read + + :help file-explorer + :help 22.1 + + +6.7. How do I edit files over a network using ftp/scp/rcp/http? + +You can use the netrw.vim plugin, supplied with the standard Vim package, +to edit files over a network using ftp/scp/rcp/http. Using this plugin, Vim +will transparently load and save the files over ftp/scp/rcp/http. For +example, to edit a file over ftp, you can use the following command: + + $ vim ftp://machine/path + +For more information, read + + :help netrw.vim + + +============================================================================= + +SECTION 7 - BUFFERS + + +7.1. I have made some modifications to a buffer. How do I edit another + buffer without saving the modified buffer and also without losing the + modifications? + +You can set the 'hidden' option to edit a file without losing modifications +to the current file: + + :set hidden + +By setting the 'hidden' option, you can also save the modification history +(undo-history) for the buffer. Otherwise, as you switch between files, the +undo-history will be lost. + +For more information, read + + :help 'hidden' + :help hidden-quit + :help :hide + + +7.2. How do I configure Vim to auto-save a modified buffer when switching + to another buffer? + +You can set the 'autowrite' option to auto-save a modified buffer when +switching to another buffer: + + :set autowrite + +For more information, read + + :help 'autowrite' + :help 'autowriteall' + :help 'hidden' + + +7.3. How do I replace the buffer in the current window with a blank buffer? + +You can use the ":enew" command to load an empty buffer in place of the +buffer in the current window. + +For more information, read + + :help :enew + + +7.4. Is there a keyboard shortcut to load a buffer by the buffer number? + +You can use the CTRL-^ command to load a buffer by specifying the buffer +number. For example, to load buffer number 5, you have to use the 5 CTRL-^ +command. + +For more information, read + + :help CTRL-^ + + +7.5. How do I open all the current buffers in separate windows? + +You can use the ":ball" or ":sball" commands to open all the buffers +in the buffer list: + + :ball + +For more information, read + + :help :ball + + +7.6. How do I close (delete) a buffer without exiting Vim? + +You can use the ":bdelete" command to delete a buffer without exiting Vim. +For example: + + :bdelete file1 + +For more information, read + + :help :bdelete + :help :bwipeout + + +7.7. I have several buffers opened with :e filename. How do I close one of + the buffers without exiting Vim? + +You can use the ":bdelete " command to close the buffer. + +For more information, read + + :help :bdelelete + :help :bunload + :help :bwipeout + + +7.8. When I use the command ":%bd" to delete all the buffers, not all the + buffers are deleted. Why? + +In the ":%bd" command, the '%' range will be replaced with the starting and +ending line numbers in the current buffer. Instead of using '%' as the +range, you should specify numbers for the range. For example, to delete all +the buffers, you can use the command ":1,9999bd". + +For more information, read + + :help :bd + + +7.9. How do I display the buffer number of the current buffer/file? + +You can use 2 command to display the buffer number for the current +file/buffer. Note the use of count before the CTRL-G command. If the count +is greater than 1, then Vim will display the buffer number. + +You can also use the following command to display the current buffer +number: + + :echo bufnr("%") + +You can also include the "%n" field to the 'statusline' option to display +the current buffer number on the statusline. + +For more information read, + + :help CTRL-G + :help bufnr() + :help :echo + :help 'statusline' + + +7.10. How do I delete a buffer without closing the window in which the + buffer is displayed? + +You can use the following command to open the next buffer and delete +the current buffer. + + :bnext | bdelete # + +For more information read, + + :help :bnext + :help :bdelete + :help :buffers + + +7.11. How do I map the tab key to cycle through and open all the buffers? + +You can use the following two map commands, to map the CTRL-Tab key to open +the next buffer and the CTRL-SHIFT-Tab key to open the previous buffer: + + :nnoremap :bnext + :nnoremap :bprevious + +For more information read, + + :help :bnext + :help :previous + + +============================================================================= + +SECTION 8 - WINDOWS + + +8.1. What is the difference between a Vim window and a buffer? + +A Vim buffer is a file loaded into memory for editing. The original file +remains unchanged until you write the buffer to the file. A Vim window is a +viewport onto a buffer. You can use multiple windows on one buffer or +several windows on different buffers. + +For more information, read + + :help usr_08.txt + :help 22.4 + :help windows-intro + :help Q_wi + + +8.2. How do I increase the width of a Vim window? + +You can increase the width of a Vim window using one of the following +commands: + + :vert resize +N + :vert resize -N + :vert resize N + +You can also use CTRL-W < or CTRL-W > or CTRL-W | commands. + +For more information, read + + :help vertical-resize + :help CTRL-W_> + :help CTRL-W_< + :help window-resize + + +8.3. How do I zoom into or out of a window? + +You can zoom into a window (close all the windows except the current +window) using the "CTRL-W o" command or the ":only" ex command. + +You can use the "CTRL-W _" command or the ":resize" ex command to increase +the current window height to the highest possible without closing other +windows. + +You can use the "CTRL-W |" command or the ":vertical resize" ex command to +increase the current window width to the highest possible without closing +other windows. + +You can use the "CTRL-W =" command to make the height and width of all the +windows equal. + +You can also set the following options to get better results with the above +commands: + +Method 1: +Set the 'winminheight' option to 0: + + :set winminheight=0 + +By default, this option is set to 1. +This option controls the minimum height of an inactive window (when it is +not the current window). When the 'winminheight' option is set to 0, only +the status line will be displayed for inactive windows. + +Method 2: +Set the 'noequalalways' option and set the 'winheight' option to a large +value (like 99999): + + :set noequalalways + :set winheight=99999 + +Now, the active window will always open to its maximum size, while the +other windows will stay present, but shrunken to just a status line. + +For more information, read + + :help CTRL-W_o + :help window-resize + :help 'winminheight' + :help 'equalalways' + :help 'winheight' + :help 08.3 + + +8.4. How do I execute an ex command on all the open buffers or open windows + or all the files in the argument list? + +You can use the ":bufdo" command to execute an ex command on all the open +buffers. You can use the ":windo" command to execute an ex command on all +the open windows. You can use the ":argdo" command to execute an ex +command on all the files specified in the argument list. + +For more information, read + + :help :windo + :help :bufdo + :help :argdo + :help 26.3 + + +============================================================================= + +SECTION 9 - MOTION + + +9.1. How do I jump to the beginning (first line) or end (last line) of a + file? + +You can use 'G' command to jump to the last line in the file and the 'gg' +command to jump to the first line in the file. + +For more information, read + + :help G + :help gg + + +9.2. In insert mode, when I press the key to go to command mode, the + cursor moves one character to the left (except when the cursor is on + the first character of the line). How do I prevent this? + +No. It is not possible to change this behavior. The cursor is *always* +positioned on a valid character (unless you have virtual-edit mode +enabled). So, if you are appending text to the end of a line, when you +return to command mode the cursor *must* drop back onto the last character +you typed. For consistency sake, the cursor drops back everywhere, even if +you are in the middle of a line. + +For more information, read + + :help 'virtual' + + +9.3. How do I configure Vim to maintain the horizontal cursor position when + scrolling with the , , etc keys? + +You can reset the 'startofline' option to keep the cursor at the same +horizontal location when scrolling text: + + :set nostartofline + +For more information, read + + :help 'startofline' + + +9.4. Some lines in a file are more than the screen width and they are all + wrapped. When I use the j, k keys to move from one line to the next, + the cursor is moved to the next line in the file instead of the next + line on the screen. How do I move from one screen line to the next? + +You can use the gj and gk commands to move from one screen line to the +next/previous screen line. + +For more information, read + + :help gj + :help gk + +You can use the following mappings: + + :map gk + :imap gk + :map gj + :imap gj + + +9.5. What is the definition of a sentence, paragraph and section in Vim? + +A sentence is defined as ending at a '.', '!' or '?' followed by either the +end of a line, or by a space (or two) or tab. Which characters and the +number of spaces needed to constitute a sentence ending is determined by +the 'joinspaces' and 'cpoptions' options. + +A paragraph begins after each empty line, and also at each of a set of +paragraph macros, specified by the pairs of characters in the 'paragraphs' +option. + +A section begins after a form-feed () in the first column and at each +of a set of section macros, specified by the pairs of characters in the +'sections' option. + +For more information, read + + :help sentence + :help 'joinspaces' + :help 'cpoptions' | /^\s*j\> + :help paragraph + :help section + :help word + + +9.6. How do I jump to beginning or end of a sentence, paragraph or a + section? + +The following motions jump relate to sentences, paragraphs and sections: + + motion position where + ( beginning current sentence + ) end current sentence + { beginning current paragraph + } end current paragraph + [] end previous section + [[ beginning current section + ][ end current section + ]] beginning next section + +Each of these motions can be preceded by a number which will extend the +jump forward (or backward). + +For more information, read + + :help object-motions + + +9.7. I have lines in a file that extends beyond the right extent of the + screen. How do I move the Vim view to the right to see the text off + the screen? + +You can use zL or zH or zl or zh or zs or ze to scroll the screen to the +left or right. + +For more information, read + + :help scroll-horizontal + + +9.8. How do I scroll two or more buffers simultaneously? + +You can set the "scrollbind" option for each of the buffer to scroll them +simultaneously. + +For more information, read + + :help 'scrollbind' + :help scroll-binding + :help 'scrollopt' + + +9.9. When I use my arrow keys, Vim changes modes, inserts weird characters + in my document but doesn't move the cursor properly. What's going on? + +There are a couple of things that could be going on: either you are using +Vim over a slow connection or Vim doesn't understand the key sequence that +your keyboard is generating. + +If you are working over a slow connection (such as a 2400 bps modem), you +can try to set the 'timeout' or 'ttimeout' option. These options, combined +with the 'timeoutlen' and 'ttimeoutlen' options, may fix the problem. + +The preceding procedure will not work correctly if your terminal sends key +codes that Vim does not understand. In this situation, your best option is +to map your key sequence to a matching cursor movement command and save +these mappings in a file. You can then ":source" the file whenever you work +from that terminal. + +For more information, read + + :help 'timeout' + :help 'ttimeout' + :help 'timeoutlen' + :help 'ttimeoutlen' + :help :map + :help vt100-cursor-keys + + +9.10. How do I configure Vim to move the cursor to the end of the previous + line, when the left arrow key is pressed and the cursor is currently + at the beginning of a line? + +You can add the '<' flag to the 'whichwrap' option to configure Vim to move +the cursor to the end of the previous line, when the left arrow key is +pressed and the cursor is currently at the beginning of a line: + + :set whichwrap+=< + +Similaly, to move the cursor the beginning of the next line, when the right +arrow key is pressed and the cursor is currently at the end of a line, add +the '>' flag to the 'whichwrap' option: + + :set whichwrap+=> + +The above will work only in normal and visual modes. To use this in insert +and replace modes, add the '[' and ']' flags respectively. + +For more information, read + + :help 'whichwrap' + :help 05.7 + + +9.11. How do I configure Vim to stay only in insert mode (modeless + editing)? + +You can set the 'insertmode' option to configure Vim to stay only in insert +mode: + + :set insertmode + +By setting this option, you can use Vim as a modeless editor. If you press +the key, Vim will not go to the normal mode. To execute a single +normal mode command, you can press CTRL-O followed by the normal mode +command. To execute more than one normal command, you can use CTRL-L +followed by the commands. To return to insert mode, press the key. To +disable this option, reset the 'insertmode' option: + + :set noinsertmode + +You can also start vim using the "evim" command or you can use "vim -y" to +use Vim as a modeless editor. + +For more information, read + + :help 'insertmode' + :help i_CTRL-O + :help i_CTRL-L + :help evim + :help evim-keys + + +9.12. How do I save and use Vim marks across Vim sessions? + +You can save and restore Vim marks across Vim sessions using the viminfo +file. To use the viminfo file, make sure the 'viminfo' option is not empty. +To save and restore Vim marks, the 'viminfo' option should not contain the +'f' flag or should have a value greater than zero for the 'f' option. + +For more information, read + + :help 21.3 + :help viminfo + :help 'viminfo' + :help :wviminfo + :help :rviminfo + + +9.13. How do I display some context lines when scrolling text? + +You can set the 'scrolloff' option to display a minimal number of screen +lines (context) above and below the cursor. + + :set scrolloff=10 + +For more information, read + + :help 'scrolloff' + :help 'sidescrolloff' + + +============================================================================= + +SECTION 10 - SEARCHING TEXT + + +10.1. After I searched for a text with a pattern, all the matched text + stays highlighted. How do I turn off the highlighting + temporarily/permanently? + +The 'hlsearch' option controls whether all the matches for the last +searched pattern are highlighted or not. By default, this option is not +enabled. If this option is set in a system-wide vimrc file, then you can +turn off the search highlighting by using the following command: + + :set nohlsearch + +To temporarily turn off the search highlighting, use + + :nohlsearch + +You can also clear the search highlighting, by searching for a pattern that +is not in the current file (for example, search for the pattern 'asdf'). + +For more information, read + + :help 'hlsearch' + :help :nohlsearch + + +10.2. How do I enter a carriage return character in a search pattern? + +You can either use '\r' or to enter a carriage return +character in a pattern. In Vim scripts, it is better to use '\r' for the +carriage return character. + +For more information, read + + :help sub-replace-special + + +10.3. How do I search for the character ^M? + +You can enter the ^M character in a search command by first pressing the +CTRL-V key and then pressing the CTRL-M key. + + /^V^M + +You can also use the "\r" character. In Vim scripts, "\r" is preferred. + +For more information, read + + :help c_CTRL-V + :help using_CTRL-V + :help /\r + + +10.4. How can I search/replace characters that display as '~R', '~S', etc.? + +You can use the 'ga' command to display the ASCII value/code for the +special character. For example, let us say the ASCII value is 142. Then you +can use the following command to search for the special character: + + /^V142 + +where, ^V is entered by pressing CTRL-V. + +For more information, read + + :help ga + :help using_CTRL_V + :help 24.8 + + +10.5. How do I highlight all the non-printable characters in a file? + +You can use the following commands and search pattern to highlight all the +non-printable characters in a file: + + :set hlsearch + /\(\p\|$\)\@!. + +For more information, read + + :help /\p + :help /bar + :help /$ + :help /\( + :help /\@! + :help 'hlsearch' + + +10.6. How do I search for whole words in a file? + +You can search for whole words in a file using the \< and \> atoms. For +example: + + /\ + +The \< atom matches the beginning of the word and the \> atom matches the +end of the word. + +For more information, read + + :help /\< + :help /\> + + +10.7. How do I search for the current word under the cursor? + +You can press the * key to search forward for the current word under the +cursor. To search backward, you can press the # key. Note that only whole +keywords will be searched using these commands. + +For more information, read + + :help star + :help # + :help g* + :help g# + :help 03.8 + :help search-commands + + +10.8. How do I search for a word without regard to the case (uppercase or + lowercase)? + +To always ignore case while searching for a pattern, set the 'ignorecase' +option: + + :set ignorecase + +To ignore case only when searching a particular pattern, use the special \c +directive: + + /\c + +For more information, read + + :help 'ignorecase' + :help /ignorecase + :help /\c + + +10.9. How do I search for words that occur twice consecutively? + +You can use one of the following search commands to locate words that occur +twice consecutively: + + /\(\<\w\+\)\_s\+\1\> + /\(\<\k\+\)\_s\+\1\> + +The main difference is the use of '\w' and '\k', where the latter is based +on the 'iskeyword' option which may include accented and other language +specific characters. + +For more information, read + + :help /\1 + :help /\( + :help /\) + :help /\< + :help /\> + :help /\w + :help /\k + :help /\+ + :help /\_x + :help 'iskeyword' + + +10.10. How do I count the number of times a particular word occurs in a + buffer? + +You can use the following set of commands to count the number of times a +particular word occurs in a buffer: + + :let cnt=0 + :g/\/let cnt=cnt+1 + :echo cnt + +This only counts the number of lines where the word occurs. You can also +use the following command: + + :%s/\/&/g + +To count the number of alphabetic words in a file, you can use + + :%s/\a\+/&/g + +To count the number of words made up of non-space characters, you can use + + :%s/\S\+/&/g + +For more information, read + + :help count-items + :help word-count + :help v_g_CTRL-G + :help 12.5 + + +10.11. How do I place the cursor at the end of the matched word when + searching for a pattern? + +You can use the 'e' offset to the search command to place the cursor at the +end of the matched word. For example + + /mypattern/e + +For more information about search offsets, read + + :help search-offset + :help / + + +10.12. How do I search for an empty line? + +You can search for an empty line using: + + /^$ + + or + + /^\s*$ + +For more information, read + + :help /^ + :help /$ + :help /\s + :help /* + :help search-commands + + +10.13. How do I search for a line containing only a single character? + +You can search for a line containing only a single character using: + + /^\s*\a\s*$ + +For more information, read + + :help /^ + :help /\a + :help /\s + :help /* + :help /$ + + +10.14. How do I search and replace a string in multiple files? + +You can use the 'argdo' or 'bufdo' or 'windo' commands to execute an ex +command on multiple files. For example: + + :argdo %s/foo/bar/g + +For more information, read + + :help :argdo + :help :bufdo + :help :windo + + +10.15. I am using the ":s" substitute command in a mapping. When a search + for a pattern fails, the map terminates. I would like the map to + continue processing the next command, even if the substitute command + fails. How do I do this? + +You can use the 'e' flag to the substitute command to continue processing +other commands in a map, when a pattern is not found. + +For more information, read + + :help :s_flags + + +10.16. How do I search for the n-th occurrence of a character in a line? + +To search for the n-th occurrence of a character in a line, you can prefix +the 'f' command with a number. For example, to search for the 5th +occurrence of the character @ in a line, you can use the command 5f@. This +assumes the cursor is at the beginning of the line - and that this first +character is not the one your are looking for. + +For more information, read + + :help f + :help F + :help t + :help T + :help ; + :help , + + +10.17. How do I replace a tab (or any other character) with a hard return + (newline) character? + +You can replace a tab (or any other character) with a hard return (newline) +character using the following command: + + :s/\t/\r/ + +Note that in the above command, if you use \n instead of \r, then the tab +characters will not be replaced by a new-line character. + +For more information, read + + :help sub-replace-special + :help NL-used-for-Nul + :help CR-used-for-NL + + +10.18. How do I search for a character by its ASCII value? + +You can search for a character by its ASCII value by pressing CTRL-V +followed by the decimal or hexadecimal or octal value of that character in +the search "/" command. To determine the ASCII value of a character you +can use the ":ascii" or the "ga" command. + +For more information, read + + :help i_CTRL-V_digit + :help :ascii + :help ga + + +10.19. How do I search for long lines? + +You can search for long lines or lines containing more than a specific +number of characters using the Vim regular-expressions in the search +command. For example, to search for all the lines containing more than 80 +characters, you can use one of the following commands: + + /^.\{80}.*$ + /^.*\%80c.*$ + +For more information, read + + :help /\{ + :help /\%c + + +============================================================================= + +SECTION 11 - CHANGING TEXT + + +11.1. How do I delete all the trailing white space characters (SPACE and + TAB) at the end of all the lines in a file? + +You can use the ":substitute" command on the entire file to search and +remove all the trailing white space characters: + + :%s/\s\+$// + +For more information, read + + :help :% + :help :s + :help /\s + :help /\+ + :help /$ + + +11.2. How do I replace all the occurrences of multiple consecutive space + characters to a single space? + +You can use the following command to replace all the occurrences of +multiple consecutive space characters to a single space: + + :%s/ \{2,}/ /g + +For more information, read + + :help :% + :help :s + :help /\{ + :help :s_flags + + +11.3. How do I reduce a range of empty lines into one line only? + +You can use the following command to reduce a range of empty lines into one +line only: + + :v/./.,/./-1join + +The explanation for this command is below: + + :v/./ Execute the following command for all lines not + containing a character (empty lines). + ., Use the current line as the start of the range of + lines. + /./ Use the line containing a character as the last line. + -1 Adjust the range of lines to end with the line before + the last line. + j Join the lines in the range. + +Note that this will give an error message if the empty lines are at the end +of the file. To correct this, you have to add a temporary line at the end +of the file, execute the command and then remove the temporary line. + +For more information, read + + :help :v + :help :join + :help cmdline-ranges + :help collapse + + +11.4. How do I delete all blank lines in a file? How do I remove all the + lines containing only space characters? + +To remove all blank lines, use the following command: + + :g/^$/d + +To remove all lines with only whitespace (spaces or tabs) in them, use the +following command: + + :g/^\s\+$/d + +To remove all the lines with only whitespace, if anything, use the +following command: + + :g/^\s*$/d + + +11.5. How do I copy/yank the current word? + +You can use the "yiw" (yank inner word without whitespace) command or the +"yaw" (yank a word with whitespace) command to copy/yank the current +word. + +For more information, read + + :help 04.6 + :help 04.8 + :help iw + :help yank + :help text-objects + :help objects + + +11.6. How do I yank text from one position to another position within a + line, without yanking the entire line? + +You can specify a motion command with the yank operator (y) to yank text +from one position to another position within a line. For example, to yank +from the current cursor position till the next letter x, use yfx or Fx or +tx or Tx. To yank till the nth column, use n|. To yank till the next +occurrence of a 'word', use /word. To do a yank till the nth column on +another line, first mark the position using the 'ma' command, go to the +start of the yank position, and then yank till the mark using y`a (note the +direction of the quote) + +For more information, read + + :help yank + :help motion.txt + :help 4.6 + + +11.7. When I yank some text into a register, how do I append the text to + the current contents of the register? + +When you specify the register for some operation, if you use the upper-case +for the register name, then the new text will be appended to the existing +contents. For example, if you have some text in the register "a". If you +want to append some new text to this, you have to use the "A" register +name. If you use the lowercase register name, then the contents of the +register will be overwritten with the new text. + +For more information, read + + :help quote + :help quote_alpha + :help 10.1 + + +11.8. How do I yank a complete sentence that spans over more than one line? + +To yank a complete sentence that spans over more than one line you have to +use the yank operator followed by a motion command. For example: + + y) + +From inside the sentence you can use 'yi)' to yank the sentence. + +For more information, read + + :help yank + :help {motion} + :help object-motions + :help 4.6 + + +11.9. How do I yank all the lines containing a pattern into a buffer? + +You can use the ":global" command to yank all the lines containing the +pattern into a register and then paste the contents of the register into +the buffer: + + :let @a='' + :g/mypattern/y A + +The first command, clears the contents of the register "a". The second +command copies all the lines containing "mypattern" into the register "a". +Note that the capital letter "A" is used to append the matched lines. Now +you can paste the contents of register "a" to a buffer using "ap command. +For more information, read + + :help :g + :help :y + :help let-register + :help quote_alpha + :help put + :help registers + :help :registers + + +11.10. How do I delete all the lines in a file that does not contain a + pattern? + +You can use ":v" command to delete all the lines that does not contain a +pattern: + + :v/pattern/d + +or + + :g!/pattern/d + +For more information, read + + :help :v + :help :g + + +11.11. How do I add a line before each line with "pattern" in it? + +You can use the following command to add a line before each line with +"pattern" in it: + + :g/pattern/normal Oi + +Alternatively you can yank the line using the Y command and then insert the +line using the following command: + + :g/pattern/put! + +For more information, read + + :help :g + :help :put + :help insert + :help 0 + + +11.12. Is there a way to operate on a line if the previous line contains a + particular pattern? + +You can use the ":global" command to operate on a line, if the previous +line contains a particular pattern: + + :g//+{cmd} + +For more information, read + + :help :g + :help :range + + +11.13. How do I execute a command on all the lines containing a pattern? + +You can use the ":global" (:g) command to execute a command on all the +lines containing a pattern. + + :g/my pattern/d + +If you want to use a non-Ex command, then you can use the ":normal" +command: + + :g/my pattern/normal {command} + +Unless you want the normal mode commands to be remapped, consider using a +":normal!" command instead (note the "!"). + +For more information, read + + :help :global + :help :v + :help :normal + + +11.14. Can I copy the character above the cursor to the current cursor + position? + +In Insert mode, you can copy the character above the cursor to the current +cursor position by typing . The same can be done with the +characters below the cursor by typing . + +For more information, read + + :help i_CTRL-Y + :help i_CTRL-E + + +11.15. How do I insert a blank line above/below the current line without + entering insert mode? + +You can use the ":put" ex command to insert blank lines. For example, try + + :put ='' + :put! ='' + +For more information, read + + :help :put + + +11.16. How do I insert the name of current file into the current buffer? + +There are several ways to insert the name of the current file into the +current buffer. In insert mode, you can use the % or the +=expand("%") command. In normal mode, you can use the ":put =@%" +command. + +For more information, read + + :help i_CTRL-R + :help expand() + :help !! + + +11.17. How do I move the cursor past the end of line and insert some + characters at some columns after the end of the line? + +You can set the "virtualedit" option to move the cursor past the +end-of-line and insert characters in a column after the end-of-line. To +start the virtual mode, use + + :set virtualedit=all + +For more information, read + + :help 'virtualedit' + + +11.18. How to replace the word under the cursor (say: junk) with + "foojunkbar" in Vim? + +There are several ways to do this. If the word is the first such word on +the line, use the following command: + + :exe "s/".expand("")."/foo&bar/" + +Too match specifically you could use a more complex substitution like this: + + :exe 's/\<'.expand("").'\%>'.(col(".")-1).'c\>/foo&bar/' + +You can also use the command: ciwfoo"bar + +For more information, read + + :help :substitute + :help expand() + :help col() + :help /\%c + + +11.19. How do I replace a particular text in all the files in a directory? + +You can use the "argdo" command to execute the substitute command on all +the files specified as arguments: + + :args * + :argdo %s///ge | update + +For more information, read + + :help :args_f + :help :argdo + :help :s_flags + + +11.20. I have some numbers in a file. How do I increment or decrement the + numbers in the file? + +You can use the CTRL-A key to increment the number and the CTRL-X key to +decrement the number. You can also specify the number to +increment/decrement from the number by specifying a count to the key. This +works for decimal, octal and hexadecimal numbers. + +For more information, read + + :help CTRL-A + :help CTRL-X + :help 'nrformats' + + +11.21. How do I reuse the last used search pattern in a ":substitute" + command? + +To reuse the last used search pattern in a ":substitute" command, don't +specify a new search pattern: + + :s/pattern/newtext/ + :s//sometext/ + +In the second ":s" command, as a search pattern is not specified, the +pattern specified in the first ":s" command 'pattern' will be used. + +If you want to change the search pattern but repeat the substitution +pattern you can use the special right hand side, you can use the tilde +character: + + :s/newpattern/~/ + +For more information, read + + :help :s + :help :& + :help :~ + :help & + :help sub-replace-special + + +11.22. How do I change the case of a string using the ":substitute" + command? + +You can use special characters in the replacement string for a +":substitute" command to change the case of the matched string. For +example, to change the case of the string "MyString" to all uppercase, you +can use the following command: + + :%s/MyString/\U&/g + +To change the case to lowercase, you can use the following command: + + :%s/MyString/\L&/g + +To change the case of the first character in all the words in the current +line to uppercase, you can use the following command: + + :s/\<\(.\)\(\k*\)\>/\u\1\L\2/g + +For more information, read + + :help sub-replace-special + :help :substitute + :help \U + :help \L + :help \u + + +11.23. How do I enter characters that are not present in the keyboard? + +You can use digraphs to enter characters that are not present in the +keyboard. You can use the ":digraphs" command to display all the currently +defined digraphs. You can add a new digraph to the list using the +":digraphs" command. + +For more information, read + + :help digraphs + :help 'digraphs' + :help 24.9 + + +11.24. Is there a command to remove any or all digraphs? + +No. The digraphs table is defined at compile time. You can only add new +ones. Adding a command to remove digraphs is on the todo list. + + +11.25. In insert mode, when I press the backspace key, it erases only the + characters entered in this instance of insert mode. How do I erase + previously entered characters in insert mode using the backspace + key? + +You can set the 'backspace' option to erase previously entered characters +in insert mode: + + :set backspace=indent,eol,start + +For more information, read + + :help 'backspace' + + +11.26. I have a file which has lines longer than 72 characters terminated + with "+" and wrapped to the next line. How can I quickly join the + lines? + +You can use the ":global" command to search and join the lines: + + :g/+$/j + +This will, however, only join every second line. A couple of more complex +examples which will join all consecutive lines with a "+" at the end are: + + :g/*$/,/\(^\|[^+]\)$/j + :g/+$/mark a | .,/\(^\|[^+]\)$/s/+$// | 'a,.j + +For more information, read + + :help :g + :help :j + :help :mark + + +11.27. How do I paste characterwise yanked text into separate lines? + +You can use the ":put" command to paste characterwise yanked text into new +lines: + + :put =@" + +For more information, read + + :help :put + :help quote_= + + +11.28. How do I change the case (uppercase, lowercase) of a word or a + character or a block of text? + +You can use the "~" command to switch the case of a character. + +You can change the case of the word under the cursor to uppercase using the +"gUiw" or "viwU" command and to lowercase using the "guiw" or "viwu" +command. + +You can switch the case (upper case to lower case and vice versa) of the +word under the cursor using the "viw~" or "g~iw" command. + +You can use the "gUgU" command to change the current line to uppercase and +the "gugu" command to change the current line to lowercase. + +You can use the "g~g~" command to switch the case of the current line. You +can use the "g~{motion}" or "{Visual}~" commands to switch the case of a +block of text. + +For more information, read + + :help case + + +11.29. How do I enter ASCII characters that are not present in the + keyboard? + +You can enter ASCII characters that are not present in the keyboard by +pressing CTRL-V and then the ASCII character number. You can also use +digraphs to enter special ASCII characters. + +For more information, read + + :help i_CTRL-V_digit + :help digraphs + :help 45.5 + + +11.30. How do I replace non-printable characters in a file? + +To replace a non-printable character, you have to first determine the ASCII +value for the character. You can use the ":ascii" ex command or the "ga" +normal-mode command to display the ASCII value of the character under the +cursor. + +You can enter the non-printable character by entering CTRL-V followed by +the decimal number 1-255 (with no leading zero), or by x and a hex number +00-FF, or by an octal number 0-0377 (with leading zero), or by u and a hex +number 0-FFFF, or by U and a hex number 0-7FFFFFFF + +Another alternative is to use the ":digraphs" ex command to display the +digraphs for all characters, together with their value in decimal and +alpha. You can enter a non-printable character by entering CTRL-K followed +by two alphanumeric characters (a digraph). + +For more information, read + + :help :ascii + :help i_CTRL-V + :help i_CTRL-V_digit + :help :digraphs + + +11.31. How do I remove duplicate lines from a buffer? + +You can use the following user-defined command to remove all the duplicate +lines from a buffer: + +:command -range=% Uniq ,g/^\%<l\(.*\)\n\1$/d + +Add the above command to your .vimrc file and invoke ":Uniq" to remove all +the duplicate lines. + + +11.32. How do I prefix all the lines in a file with the corresponding line + numbers? + +You can prefix the lines with the corresponding line number in several +ways. Some of them are listed below: + + :%s/^/\=line('.'). ' ' + :%s/^/\=strpart(line(".")." ", 0, 5) + :g/^/exec "s/^/".strpart(line(".")." ", 0, 4) + +For more information, read + + :help sub-replace-special + :help line() + :help expr6 + :help strpart() + :help :execute + :help :global + + +11.33. How do I exchange (swap) two characters or words or lines? + +You can exchange two characters with the "xp" command sequence. The 'x' +will delete the character under the cursor and 'p' will paste the just +deleted character after the character under the cursor. This will result +in exchanging the two characters. + +You can exchange two words with the "deep" command sequence (start with the +cursor in the blank space before the first word). + +You can exchange two lines with the "ddp" command sequence. The 'dd' will +delete the current line and 'p' will paste the just deleted line after the +current line. This will result in exchanging the two lines. + +All of the above operations will change the " unnamed register. + +You can use the ":m +" ex command to exchange two lines without changing the +unnamed register. + +For more information, read + + :help x + :help p + :help dd + :help d + :help e + :help linewise-register + :help quotequote + :help :move + + +============================================================================= + +SECTION 12 - COMPLETION IN INSERT MODE + + +12.1. How do I complete words or lines in insert mode? + +In insert mode, you can complete words using the CTRL-P and CTRL-N keys. +The CTRL-N command searches forward for the next matching keyword. +The CTRL-P command searches backwards for the next matching keyword. + +In insert mode, you can use the CTRL-X CTRL-L command sequence to complete +lines that starts with the same characters as in the current line before +the cursor. To get the next matching line, press the CTRL-P or CTRL-N keys. +There are a lot of other keys/ways available to complete words in insert +mode. + +Vim supports completion of the following items: + + CTRL-X CTRL-F file names + CTRL-X CTRL-L whole lines + CTRL-X CTRL-D macro definitions (also in included files) + CTRL-X CTRL-I current and included files + CTRL-X CTRL-K words from a dictionary + CTRL-X CTRL-T words from a thesaurus + CTRL-X CTRL-] tags + CTRL-X CTRL-V Vim command line + +For more information, read + + :help 24.3 + :help ins-completion + + +12.2. How do I complete file names in insert mode? + +In insert mode, you can use the CTRL-X CTRL-F command sequence to complete +filenames that start with the same characters as in the current line before +the cursor. + +For more information, read + + :help compl-filename + + +12.3. I am using CTRL-P/CTRL-N to complete words in insert mode. How do I + complete words that occur after the just completed word? + +You can use CTRL-X CTRL-N and CTRL-X CTRL-P keys to complete words that are +present after the just completed word. + +For more information, read + + :help i_CTRL-X_CTRL-P + :help i_CTRL-X_CTRL-N + :help ins-completion + + +============================================================================= + +SECTION 13 - TEXT FORMATTING + + +13.1. How do I format a text paragraph so that a new line is inserted at + the end of each wrapped line? + +You can use the 'gq' command to format a paragraph. This will format the +text according to the current 'textwidth' setting. + +Note that the gq operator can be used with a motion command to operate on a +range of text. For example: + + gqgq - Format the current line + gqap - Format current paragraph + gq3j - Format the current and the next 3 lines + +For more information, read + + :help gq + :help formatting + :help usr_25.txt + :help motion.txt + + +13.2. How do I format long lines in a file so that each line contains less + than 'n' characters? + +First set the 'textwidth' option to the desired value: + + set textwidth=70 + +Now to break the long lines to the length defined by the 'textwidth' +option, use + + :g/./normal gqq + +For more information, read + + :help gq + + +13.3. How do I join short lines to form a paragraph? + +First, make sure the 'textwidth' option is set to a high value: + + :set textwidth=99999 + +Next, join the short lines to form a paragraph using the command: + + 1GgqG + +The above command will operate on the entire file. To do the formatting on +all paragraphs in a specific range, use: + + :'a,'bg/\S/normal gq} + +For more information, read + + :help gq + :help G + :help gqq + + +13.4. How do I format bulleted and numbered lists? + +You can configure Vim to format bulleted and numbered lists using the +'formatoptions' option. For example, you can format the list of the +following format: + + - this is a test. this is a test. this is a test. this is a test. + this is a test. + +into this format: + + - this is a test. this is a test. this is a test. this is a test. + this is a test. + +You can use the 'n' flag in the 'formatoptions' to align the text. + + :set fo+=n + +With this option, when formatting text, Vim will recognize numbered lists. +For this option to work, the 'autoindent' option also must be set. + +For more information, read + + :help 'formatoptions' + :help fo-table + + +13.5. How do I indent lines in insert mode? + +In insert mode, you can press the CTRL-T key to insert one shiftwidth of +indent at the start of the current line. In insert mode, you can use the +CTRL-D key to delete on shiftwidth of indent at the start of the current +line. You can also use the CTRL-O >> and CTRL-O << commands to indent the +current line in insert mode. + +For more information, read + + :help i_CTRL-T + :help i_CTRL-D + :help i_0_CTRL-D + :help i_CTRL-O + :help >> + :help << + + +13.6. How do I format/indent an entire file? + +You can format/indent an entire file using the gg=G command, where + + gg - Goto the beginning of the file + = - apply indentation + G - till end of file + +For more information, read + + :help gg + :help = + :help G + :help 'formatprg' + :help C-indenting + + +13.7. How do I increase or decrease the indentation of the current line? + +You can use the '>>' and '<<' commands to increase or decrease the +indentation of the current line. + +For more information, read + + :help shift-left-right + :help >> + :help << + :help 'shiftwidth' + + +13.8. How do I indent a block/group of lines? + +You can visually select the group of lines and press the > or < key to +indent/unindent the lines. You can also use the following ex-command to +indent the lines + + :10,20> + +For more information, read + + :help shift-left-right + :help v_> + :help v_< + :help :< + :help :> + + +13.9. When I indent lines using the > or < key, the standard 8-tabstops are + used instead of the current 'tabstop' setting. Why? + +The number of spaces used when lines are indented using the ">" operator is +controlled by the 'shiftwidth' option. The 'tabstop' setting is not used +for indentation. To change the amount of spaces used for indentation, use +the command: + + :set shiftwidth=4 + +For more information, read + + :help 'shiftwidth' + :help >> + :help 'softtabstop' + + +13.10. How do I turn off the automatic indentation of text? + +By default, the automatic indentation of text is not turned on. Check the +configuration files (.vimrc, .gvimrc) for settings related to indentation. +Make sure the ":filetype indent on" command is not present. If it is +present, remove it. Also, depending on your preference, you may also want +to check the value of the 'autoindent', 'smartindent', 'cindent' and +'indentexpr' options and turn them off as needed. + +For more information, read + + :help :filetype-indent-off + :help 'autoindent' + :help 'smartindent' + :help 'cindent' + :help 'indentexpr' + + +13.11. How do I configure Vim to automatically set the 'textwidth' option + to a particular value when I edit mails? + +You can use the 'FileType' autocommand to set the 'textwidth' option: + + autocmd FileType mail set tw= + +For more information, read + + :help :autocmd + :help FileType + :help usr_43.txt + + +13.12. Is there a way to make Vim auto-magically break lines? + +Yes. Set the 'textwidth' option to the preferred length for a line. Then +Vim will auto-magically break the newly entered lines. For example: + + :set textwidth=75 + +For more information, read + + :help textwidth + :help ins-textwidth + :help 'formatoptions' + :help fo-table + :help formatting + + +13.13. I am seeing a lot of ^M symbols in my file. I tried setting the + 'fileformat' option to 'dos' and then 'unix' and then 'mac'. None of + these helped. How can I hide these symbols? + +When a file is loaded in Vim, the format of the file is determined as +below: + +- If all the lines end with a new line (), then the fileformat is + 'unix'. +- If all the lines end with a carriage return () followed by a new line + (), then the fileformat is 'dos'. +- If all the lines end with carriage return (), then the fileformat is + 'mac'. + +If the file has some lines ending with and some lines ending with +followed by a , then the fileformat is set to 'unix'. + +You can change the format of the current file, by modifying the +'fileformat' option and then saving the file: + + :set fileformat=dos + :w + +To display the format of the current file, use + + :set fileformat? + +The above behavior is also controlled by the 'fileformats' option. You can +try the following commands: + + :set fileformats+=unix + :e + :set fileformat=unix + :w + +For more information, read + + :help 'fileformats' + :help 'fileformat' + :help file-formats + :help DOS-format-write + :help Unix-format-write + :help Mac-format-write + :help dos-file-formats + :help 23.1 + + +13.14. When I paste some text into a Vim buffer from another application, + the alignment (indentation) of the new text is messed up. How do I + fix this? + +The indentation of the text is messed up due to various Vim settings +related to indentation (like autoindent, smartindent, textwidth etc). +Before pasting text into Vim, you can set the 'paste' option: + + :set paste + +After pasting the text, you can turn off the option using: + + :set nopaste + +You can also toggle the paste option using: + + :set paste! + +If you can access the clipboard through the * register, then you can paste +the text without indentation using CTRL-R CTRL-O *. + +For more information, read + + :help 'paste' + :help 'pastetoggle' + :help i_CTRL-R_CTRL_O + :help clipboard + :help xterm-clipboard + :help gui-clipboard + + +13.15. When there is a very long wrapped line (wrap is "on") and a line + doesn't fit entirely on the screen it is not displayed at all. There + are blank lines beginning with '@' symbol instead of wrapped line. If + I scroll the screen to fit the line the '@' symbols disappear and the + line is displayed again. What Vim setting control this behavior? + +You can set the 'display' option to 'lastline' to display as much as +possible of the last line in a window instead of displaying the '@' +symbols. + + :set display=lastline + +For more information, read + + :help 'display' + + +13.16. How do I convert all the tab characters in a file to space + characters? + +You can use the ":retab" command to update all the tab characters in the +current file with the current setting of 'expandtab' and 'tabstop'. For +example, to convert all the tabs to white spaces, use + + :set expandtab + :retab + +For more information, read + + :help :retab + :help 'expandtab' + :help 'tabstop' + :help 25.3 + + +13.17. What Vim options can I use to edit text that will later go to a word + processor? + +You can set the following options to edit text that will later go into a +word processor: + + :set wrap + :set linebreak + :set textwidth=0 + :set showbreak=>>> + +You can use the 'gk' and 'gj' commands to move one screen line up and down. +For more information, read + + :help 'wrap' + :help 'linebreak' + :help 'textwidth' + :help 'showbreak' + :help gk + :help gj + + +============================================================================= + +SECTION 14 - VISUAL MODE + + +14.1. How do I do rectangular block copying? + +You can do rectangular block copying in Vim using the blockwise visual +mode. To start blockwise visual mode use the CTRL-V key. Move the cursor +using any of the motion commands and then use the y operator to yank to +visually selected text. + +If CTRL-V does not work as expected, it may have been remapped to CTRL-Q by +the mswin.vim script which is often sourced by a vimrc on Windows machines +to mimic some common short cuts from other programs. + +For more information, read + + :help 04.4 + :help blockwise-visual + :help visual-mode + :help Q_vi + + +14.2. How do I delete or change a column of text in a file? + +You can use the Vim block-wise visual mode to select the column of text and +apply an operator (delete, change, copy, etc) on it. + +For more information, read + + :help visual-block + :help visual-operators + + +14.3. How do I apply an ex-command on a set of visually selected lines? + +When you select a range of lines in visual mode, the < register is set to +the start of the visual region and the > register is set to the end of the +visual region. You can use these registers to specify the range for an ex +command. After visually selecting the lines, press ":" to go to the command +mode. Vim will automatically insert the visual range '<,'>. You can run +any ex-command on the visual range. + +For more information, read + + :help v_: + :help '< + :help '> + + +14.4. How do I execute an ex command on a column of text selected in Visual + block mode? + +All the ex commands operate on whole lines only. If you try to execute an +ex command on a column of text selected in visual block mode, Vim will +operate on all the selected lines (instead of the selected columns). You +can use the vis.vim plugin script from http://vim.sourceforge.net scripts +archive to do this. + +For more information, read + + :help cmdline-ranges + :help 10.3 + :help cmdline-lines + + +14.5. How do I select the entire file in visual mode? + +You can select the entire file in visual mode using ggVG. + + gg - go to the beginning of the file. + V - Start linewise visual mode + G - goto the end of the file. + +For more information, read + + :help gg + :help linewise-visual + :help G + + +14.6. When I visually select a set of lines and press the > key to indent + the selected lines, the visual mode ends. How can I reselect the + region for further operation? (or) How do I re-select the last + selected visual area again? + +You can use the 'gv' command to reselect the last selected visual area. You +can also use the marks '< and '> to jump to the beginning or the end of the +last selected visual area. + +For more information, read + + :help gv + :help '< + :help '> + + +14.7. How do I jump to the beginning/end of a visually selected region? + +You can use the 'o' command to jump to the beginning/end of a visually +selected region. + +For more information, read + + :help v_o + + +14.8. When I select text with mouse and then press : to enter an ex + command, the selected text is replaced with the : character. How do I + execute an ex command on a text selected using the mouse similar to + the text selected using the visual mode? + +This will happen if you have configured Vim to use select mode instead of +Visual mode by setting the 'selectmode' option. Check the value of this +option: + + :set selectmode? + +This mode is known as selectmode and is similar to the visual mode. This +option is also automatically set when you use the "behave mswin" command. +Select mode looks like visual mode, but it is similar to the selection mode +in MS-Windows. + +For more information, read + + :help Select-mode + :help 'selectmode' + :help 9.4 + :help :behave + + +14.9. When I select a block of text using the mouse, Vim goes into + selection mode instead of Visual mode. Why? + +The 'selectmode' option controls whether Select mode will be started when +selecting a block of text using the mouse. To start Visual mode when +selecting text using mouse, remove the 'mouse' value from the 'selectmode' +option: + + :set selectmode-=mouse + +Note that by default, the 'selectmode' option will be set to empty, so that +always visual mode is used. + +For more information, read + + :help 'selectmode' + :help Select-mode + :help :behave + + +14.10. How do I visually select the last copy/pasted text? + +You can use the '[ and '] marks to visually select the last copy/pasted +text. The '[ mark is set to the beginning of the last changed/yanked text +and the '] mark is set to the end of the last changed/yanked text. To +visually select this block of text use the command '[v'] + +For more information, read + + :help '[ + :help '] + :help `a + :help v + + +============================================================================= + +SECTION 15 - COMMAND-LINE MODE + + +15.1. How do I use the name of the current file in the command mode or an + ex command line? + +In the command line, the '%' character represents the name of the current +file. In some commands, you have to use expand("%") to get the filename: + + :!perl % + +For more information, read + + :help :_% + :help cmdline-special + :help expand() + + +15.2. How do I edit the text in the Vim command-line effectively? + +You can use the command-line window for editing Vim command-line text. To +open the Vim command-line window use the "q:" command in normal mode. In +command-line mode, use the CTRL-F key. In this window, the command line +history will be displayed. You can use normal Vim keys/commands to edit any +previous/new command line. To execute a command line, press the +enter/return key. + +In a similar vain, the search history can be edited with "q/" and "q?" +commands. + +For more information, read + + :help cmdline-window + + +15.3. How do I switch from Vi mode to Ex mode? + +You can use the Q command to switch from Vi mode to Ex mode. To switch from +Ex mode back to the Vi mode, use the :vi command. + +For more information, read + + :help Q + :help gQ + :help Ex-mode + :help :vi + + +15.4. How do I copy the output from an ex-command into a buffer? + +To copy the output from an ex-command into a buffer, you have to first get +the command output into a register. You can use the ":redir" command to get +the output into a register. For example, + + :redir @a + :g/HelloWord/p + :redir END + +Now the register 'a' will contain the output from the ex command +"g/HelloWord/p". Now you can paste the contents of the register 'a' into a +buffer. You can also send or append the output of an ex-command into a file +using the 'redir' command. + +You can prefix the ":global" command with ":silent", to avoid having the +lines printed to the screen. + +To redirect the output from an ex-command to a file, you can use the +following set of commands: + + :redir > myfile + :g/HelloWord/p + :redir END + +For more information, read + + :help :redir + :help :silent + + +15.5. When I press the tab key to complete the name of a file in the + command mode, if there are more than one matching file names, then + Vim completes the first matching file name and displays a list of all + matching filenames. How do I configure Vim to only display the list + of all the matching filenames and not complete the first one? + +You can modify the 'wildmode' option to configure the way Vim completes +filenames in the command mode. In this case, you can set the 'wildmode' +option to 'list': + + :set wildmode=list + +For more information, read + + :help 'wildmode' + + +15.6. How do I copy text from a buffer to the command line and from the + command line to a buffer? + +To copy text from a buffer to the command line, after yanking the text from +the buffer, use Ctrl-R 0 in the command line to paste the text. You can +also yank the text to a specific register and use CTRL-R to +paste the text to the command line. You can use CTRL-R CTRL-W to paste the +word under the cursor in the command line. + +To copy text from the command line into a buffer, you can paste the +contents of the : register using the ":p command. The most recently +executed command line is stored in the : register. + +Another approach for copying and pasting text to and from the command line +is to open the command line window using q: from normal mode or CTRL-F from +the command-line mode. In the command line window you can use all the Vim +commands to edit the command line. + +For more information, read + + :help c_CTRL-R + :help quote_: + :help cmdline-window + + +15.7. How do I put a command onto the command history without executing it? + +To put a command onto the command history without executing it, press the + key to cancel the command. + +For more information, read + + :help c_ + + +============================================================================= + +SECTION 16 - REMOTE EDITING + + +16.1. How do I open a file with existing instance of gvim? What happened to + the Vim 5.x OpenWithVim.exe and SendToVim.exe files? + +Starting with Vim6, the OLE version of OpenWithVim.exe and SendToVim.exe +Vim utilities are replaced by the new client-server feature. To open the +file j.txt with an existing instance of Gvim (MyVim), use: + + $ gvim --servername MyVim --remote-silent j.txt + +To list the server names of all the currently running Vim instances, use + + $ vim --serverlist + +To get more information about client-server feature, read + + :help client-server + + +16.2. How do I send a command to a Vim server to write all buffers to disk? + +You can use the Vim remote server functionality to do this: + + $ gvim --servername myVIM --remote-send ":wall" + +For more information, read + + :help client-server + :help CTRL-\_CTRL-N + :help :wall + + +16.3. Where can I get the documentation about the Vim remote server + functionality? + +You can get more information about the Vim remote server functionality by +reading + + :help client-server + + +============================================================================= + +SECTION 17 - OPTIONS + + +17.1. How do I configure Vim in a simple way? + +You can use the ":options" command to open the Vim option window: + + :options + +This window can be used for viewing and setting all the options. + +For more information, read + + :help :options + + +17.2. How do I toggle the value of an option? + +You can prefix the option with "inv" to toggle the value of the option: + + :set invignorecase + :set invhlsearch + +You can also suffix the option with "!" to toggle the value: + + :set ignorecase! + :set hlsearch! + +For more information, read + + :help set-option + + +17.3. How do I set an option that affects only the current buffer/window? + +You can use the ":setlocal" command to set an option that will affect only +the current file/buffer: + + :setlocal textwidth=70 + +Note that not all options can have a local value. You can use ":setlocal" +command to set an option locally to a buffer/window only if the option is +allowed to have a local value. + +You can also use the following command to set a option locally: + + :let &l:{option-name} = + +For more information, read + + :help :setlocal + :help local-options + + +17.4. How do I use space characters for a Vim option value? + +To use space characters in a Vim option value, you have to escape the space +character. For example: + + :set tags=tags\ /usr/tags + +For more information, read + + :help option-backslash + + +17.5. Can I add (embed) Vim option settings to the contents of a file? + +You can use modelines to add Vim option settings to the contents of a file. +For example, in a C file, you can add the following line to the top or the +bottom of the file: + + /* vim:sw=4: */ + +This will set the 'shiftwidth' option to 4, when editing that C file. +For this to work, the 'modeline' option should be set. By default, the +'modeline' option is set. The 'modelines' settings specifies the number of +lines that will be checked for the Vim set commands. + +For more information, read + + :help 21.6 + :help modeline + :help auto-setting + :help 'modeline' + :help 'modelines' + + +17.6. How do I display the line numbers of all the lines in a file? + +You can set the 'number' option to display the line numbers for all the +lines. + + :set number + +For more information, read + + :help 'number' + + +17.7. How do I change the width of the line numbers displayed using the + "number" option? + +The width used for displaying the line numbers for the 'number' option is +hard-coded in Vim. It is not possible to change this width by setting some +option. + +The request and the patch to add an option to change the number of columns +used for the 'number' option is in the Vim todo list: + + "Add an option to set the width of the 'number' column. Eight + positions is often more than needed. Or adjust the width to the length + of the file? + Add patch that adds 'numberlen' option. (James Harvey) + Other patch with min and max from Emmanuel Renieris (2002 Jul 24) + Other patch without an option by Gilles Roy (2002 Jul 25)" + + +17.8. How do I display (view) all the invisible characters in a file? + +You can set the 'list' option to see all the invisible characters in your +file. + + :set list + +With this option set, you can view space characters, tabs, newlines, +trailing space characters and wrapped lines. + +You can modify the 'listchars' option to configure how the invisible +characters are displayed. For example, with the following command all the +trailing space characters will be displayed with a '.' character. + + :set listchars=trail:. + +For more information, read + + :help 'listchars' + :help 'list' + + +17.9. How do I configure Vim to always display the current line and column + number? + +You can set the 'ruler' option to display current column and line number in +the status line: + + :set ruler + +For more information, read + + :help 'ruler' + + +17.10. How do I display the current Vim mode? + +You can set the 'showmode' option to display the current Vim mode. In +Insert, Replace and Visual modes, Vim will display the current mode on the +last line. + + :set showmode + +For more information, read + + :help 'showmode' + + +17.11. How do I configure Vim to show pending/partial commands on the + status line? + +You can set the 'showcmd' option to display pending/partial commands in the +status line: + + :set showcmd + +For more information, read + + :help 'showcmd' + + +17.12. How do I configure the Vim status line to display different + settings/values? + +You can set the 'statusline' option to display different values/settings in +the Vim status line. + +For more information, read + + :help 'statusline' + :help 'laststatus' + :help 'rulerformat' + :help 'ruler' + + +17.13. How do I configure Vim to display status line always? + +You can set the 'laststatus' option to 2 to display the status line always. + + :set laststatus=2 + +For more information, read + + :help 'laststatus' + + +17.14. How do I make a Vim setting persistent across different Vim + invocations/instances/sessions? + +To make a Vim option setting persistent across different Vim instances, add +your setting to the .vimrc or .gvimrc file. You can also use the ":mkvimrc" +command to generate a vimrc file for the current settings. + +For more information, read + + :help save-settings + :help vimrc + :help gvimrc + :help vimrc-intro + :help :mkvimrc + :help initialization + + +17.15. Why do I hear a beep (why does my window flash) about 1 second after + I hit the Escape key? + +This is normal behavior. If your window flashes, then you've got the visual +bell on. Otherwise, you should hear a beep. + +Vim needs a timeout to tell the difference between a simple escape and, +say, a cursor key sequence. When you press a key in normal mode (and even +in insert mode) and that key is the beginning of a mapping, Vim waits a +certain amount of time to see if the rest of the mapping sequence follows. +If the mapping sequence is completed before a given timeout period, the +mapping for that sequence of keys is applied. If you interrupt the mapping, +the normal actions associated with the keys are executed. + +For example, if you have a mapping defined as ":imap vvv Vim is great!!" +and you type "vvv" quickly, the "Vim is great!!" will be inserted into your +text. But if you type "vv v" then that is what will put into your text. +This is also true if you type "vvv" too slowly where "too slowly" is longer +than the value for the timeout option. Setting the timeout option to a +larger value can help alleviate problems that appear when using function +keys over a slow line. + +For more information, read + + :help ttimeout + + +17.16. How do I make the 'c' and 's' commands display a '$' instead of + deleting the characters I'm changing? + +To make the 'c' and 's' commands display a '$' instead of deleting the +characters, add the $ flag to the 'cpoptions' option: + + :set cpoptions+=$ + +For more information, read + + :help 'cpoptions' + + +17.17. How do I remove more than one flag using a single ":set" command + from a Vim option? + +You can remove more than one flag from a Vim option using a single ":set" +command, by specifying the flags in exactly the same order as they appear +in the option. For example, if you use the following command to remove the +'t' and 'n' flags from the 'formatoptions' option: + + :set formatoptions-=tn + +The 't' and 'n' flags will be removed from the 'formatoptions' option, only +if the 'formatoptions' option contains these flags in this order: 'tn'. +Otherwise, it will not remove the flags. To avoid this problem, you can +remove the flags one by one: + + :set formatoptions-=t formatoptions-=n + +For more information, read + + :help :set-= + + +============================================================================= + +SECTION 18 - MAPPING KEYS + + +18.1. How do I know what a key is mapped to? + +To see what a key is mapped to, use the following commands: + + :map + :map! + +You can also check the mappings in a particular mode using one of the +":cmap", ":nmap", ":vmap", ":imap", ":omap", etc commands. + +For more information, read + + :help map-listing + :help map-overview + + +18.2. How do list all the user-defined key mappings? + +You can list all the user-defined key mappings using: + + :map + +For more information, read + + :help map-listing + + +18.3. How do I unmap a previously mapped key? + +You can unmap a previously mapped key using the ":unmap" command: + + :unmap + :unmap! + +For mode specific mappings, you can use one of the +":nunmap/:vunmap/:ounmap/:iunmap/:lunmap/:cunmap" commands. + +The following command will fail to unmap a buffer-local mapped key: + + :unmap + +To unmap a buffer-local mapped key, you have to use the keyword in +the unmap command: + + :unmap + :unmap! + +For more information, read + + :help :unmap + :help map-modes + :help map-local + :help 'mapleader' + + +18.4. I am not able to create a mapping for the key. What is wrong? + +First make sure that the key is passed to Vim. In insert mode, press CTRL-V +followed by the desired key. You should see the keycode corresponding to +the key . If you do see the keycode, then you can create a mapping for the +key using the following command: + + :map + +For more information, read + + :help map-keys-fails + :help :map-special-keys + :help key-codes + + +18.5. How do I map the numeric keypad keys? + +First make sure that the numeric keypad keys are passed to Vim. Next, you +can use the following command to map the numeric keypad keys: + + :map + +where, can be kHome, kEnd, kPageUp, kPageDown, kPlus, kMinus, +kDivide, kMultiply, kEnter, etc. + +For more information, read + + :help key-codes + :help terminal-options + + +18.6. How do I create a mapping that works only in visual mode? + +You can create mappings that work only in specific mode (normal, command, +insert, visual, etc). To create a mapping that works only in the visual +mode, use the ":vmap" command: + + :vmap + +For more information, read + + :help :vmap + :help map-modes + :help 40.1 + + +18.7. In a Vim script, how do I know which keys to use for my mappings, so + that the mapped key will not collide with an already used key? + +Vim uses most of the keys in the keyboard. You can use the prefix +in maps to define keys which will not overlap with Vim keys. For example: + + :map S s + :map j j + :map k k + +where by default gets substituted with a backslash (\), so the +user would enter + + \s + \j + \k + +to invoke the above map commands. The user can change the mapleader +variable to be whatever they wanted: + + :let mapleader = "," + +When writing a plugin or other script, more often than not, it is advisable +to use :noremap instead of :map to avoid side effects from user defined +mappings. + +For more information, read + + :help + :help + :help write-plugin + + +18.8. How do I map the escape key? + +You can map the Escape key to some other key using the ":map" command. For +example, the following command maps the escape key to CTRL-O. + + :map + + +18.9. How do I map a key to perform nothing? + +You can map a key to to perform nothing when the key is pressed. For +example, with the following mappings, the key will do nothing when +pressed. + + :map + :map! + +For more information, read + + :help + :help :map + :help :map! + :help map-modes + + +18.10. I want to use the Tab key to indent a block of text and Shift-Tab + key to unindent a block of text. How do I map the keys to do this? + This behavior is similar to textpad, visual studio, etc. + +Use the following mapping: + + :inoremap + :nnoremap >> + :nnoremap + :vnoremap > + :vnoremap + +Note that, the mapping will work only if Vim receives the correct +key sequence. This is mostly the case with GUI Vim. + +For more information, read + + :help :inoremap + :help :nnoremap + :help :vnoremap + :help + :help i_CTRL-O + :help >> + :help << + :help + + +18.11. In my mappings the special characters like are not recognized. + How can I configure Vim to recognize special characters? + +Check the value of the 'cpoptions' option: + + :set cpoptions? + +If this option contains the '<' flag, then special characters will not be +recognized in mappings. Remove the '<' flag from 'cpoptions' option: + + :set cpo-=< + +Also, check the value of the 'compatible' option: + + :se compatible? + +The 'compatible' option must be reset: + + :se nocompatible + +For more information, read + + :help 'cpoptions' + :help 'compatible' + + +18.12. How do I use the '|' to separate multiple commands in a map? + +You can escape the '|' character using backslash (\) to use '|' in a map. + + :map _l :!ls \| more + +You can also try the following command: + + :map _l :!ls more + +There are also other ways to do this. + +For more information, read + + :help map_bar + + +18.13. If I have a mapping/abbreviation whose ending is the beginning of + another mapping/abbreviation, how do I keep the first from expanding + into the second one? + +Instead of using the ":map lhs rhs" command, use the ":noremap lhs rhs" +command. For abbreviations, use "noreabbrev lhs rhs". The "nore" prefix +prevents the mapping or abbreviation from being expanded again. + +For more information, read + + :help :noremap + :help :noreabbrev + + +18.14. Why does it take a second or more for Vim to process a key, + sometimes when I press a key? + +Make sure you have not defined a mapping for this key using the following +command: + + :map + +If a mapping is defined for this key and the mapped key contains more than +one character, then Vim will wait for the next character to be pressed to +determine whether it is the mapped key or not. For example, if you have +mapped "ab", then if you press "a", Vim will wait for the next key to be +pressed. If the next key is "b", Vim will execute the mapped sequence. +Otherwise, Vim will proceed with the normal processing of "a" followed by +the next key. If the 'timeout' option is set (which is the default), then +Vim will timeout after waiting for the period specified with the +'timeoutlen' option (default is 1 second). + +For more information, read + + :help map-typing + :help 'timeoutlen' + :help 'ttimeoutlen' + :help 'timeout' + :help 'ttimeout' + :help vt100-cursor-keys + :help slow-fast-terminal + + +18.15. How do I map a key to run an external command using a visually + selected text? + +You can the ":vmap" command to map a key in the visual mode. In the mapped +command sequence, you have to first yank the text. The yanked text is +available in the '"' register. Now, you can use the contents of this +register to run the external command. For example, to run the external +command "perldoc" on a visually selected text, you can use the following +mapping: + + :vmap y:!exec "!perldoc '" . @" . "'" + +If you want the mapping to work in the visual mode, but not with the +highlighted text, you can use the following command: + + :vmap :!perldoc + +The above mapping will use the word under the cursor instead of the +highlighted text. Note the use of the before invoking the "perldoc" +external command. The is used to erase the range of text selected in +the visual mode and displayed on the command line. If the visual range is +not removed using , then the output from the external command will +replace the visually selected text. + +For more information, read + + :help :vmap + :help quote_quote + :help let-register + :help c_CTRL-U + :help :!cmd + + +18.16. How do I map the Ctrl-I key while still retaining the functionality + of the key? + +The Ctrl-I key and the key produce the same keycode, so Vim cannot +distinguish between the Ctrl-I and the key. When you map the Ctrl-I +key, the key is also mapped (and vice versa). The same restriction +applies for the Ctrl-[ key and the key. + +For more information, read + + :help keycodes + + +============================================================================= + +SECTION 19 - ABBREVIATIONS + + +19.1. How do I auto correct misspelled words? + +You can auto correct misspelled words using abbreviations. For example, the +following abbreviation can be used to correct "teh" with "the": + + :abbreviate teh the + +Vim supports abbreviations in insert mode, replace mode and command-line +mode. + +For more information, read + + :help 24.7 + :help abbreviations + :help Q_ab + + +19.2. How do I create multi-line abbreviations? + +You can create multi-line abbreviations by embedding the "" +key code in the text: + + iabbrev #c ---------------- Date:----------- + +With the above abbreviation, when you type #c, it will be expanded to +the following text: + +-------------- +-- Date: +-- +--------- + +For more information, read + + :help abbreviations + + +19.3. When my abbreviations are expanded, an additional space character is + added at the end of the expanded text. How do I avoid this character? + +To avoid an additional space character at the end of the expanded text, you +can expand the abbreviation by pressing the CTRL-] key. The abbreviation +will be expanded without adding a space character at the end. + +Another alternative is to use the following function and command: + +function! Eatchar(pat) + let c = nr2char(getchar()) + return (c =~ a:pat) ? '' : c +endfunction +command! -nargs=+ Iabbr execute "iabbr" . "=Eatchar('\\s')" + +Now, define your abbreviations using the new "Iabbr" command instead of the +builtin "iabbrev" command. With this command, after expanding the +abbreviated text, the next typed space character will be discarded. + +For more information, read + + :help abbreviations + + +19.4. How do I insert the current date/time stamp into the file? + +You can use the strftime() function to insert the current data/time stamp +in a file. For example, you can use the following abbreviation: + + iabbrev dts =strftime("%y/%m/%d %H:%M") + +With this abbreviation, when you type dts in insert mode, it will be +expanded to the date/time stamp. + +Some other forms of the above abbreviation are listed below: + + iabbrev mdyl =strftime("%a %d %b %Y") + iabbrev mdys =strftime("%y%m%d") + iabbrev mdyc =strftime("%c") + iabbrev hml =strftime("%d/%m/%y %H:%M:%S") + iabbrev hms =strftime("%H:%M:%S") + +For more information, read + + :help strftime() + :help i_CTRL-R + + +============================================================================= + +SECTION 20 - RECORD AND PLAYBACK + + +20.1. How do I repeat an editing operation (insertion, deletion, paste, + etc)? + +You can repeat the last editing operation using the '.' command. This will +repeat the last simple change like a insert, delete, change, paste, etc. + +For more information, read + + :help 04.3 + :help single-repeat + :help Q_re + + +20.2. How I record and repeat a set of key sequences? + +You can use the 'q' command in normal mode to record a set of key sequences +and store it in a register. For example, in the normal mode you can press q +followed by a register name {0-9a-bA-Z"} to start the recording. To +end/stop the recording press q again. You can playback/repeat the recorded +key sequences by pressing @ followed by the register name. e.g. @a. + +Another approach is to start Vim with the "-w" command-line argument. + + $ vim -w + +Vim will record all the characters typed in the session in the +specified file "file_name". You can use the recorded file with the "-s" +command line argument to play it back: + + $ vim -s + +For more information, read + + :help 10.1 + :help recording + :help -w + :help -s + + +20.3. How do I edit/modify a recorded set of key sequences? + +The recorded key sequences are stored in a register. You can paste the +contents of the register into a Vim buffer, edit the pasted text and again +yank the text into the register. You can also use the ":let" command to +modify the register. For example: + + :let @a = "iHello World\" + +For more information, read + + :help recording + :help 10.1 + :help let-register + :help <> + :help 'cpoptions' + + +20.4. How do I write recorded key sequences to a file? + +The recorded key sequences are stored in a register. You can paste the +contents of the register into a Vim buffer. Now you can save the buffer +into a file. You can also modify the pasted text and again yank into the +register to modify the recorded key sequence. For example, if you record a +set of key sequences using qa ..... q. The recorded key sequences are +stored in the register 'a'. You can paste the contents of register 'a' +using "ap. + +For more information, read + + :help recording + :help 10.1 + + +20.5. I am using register 0 to record my key sequences (i.e. q0 .... q). + In the recorded key sequences, I am yanking some text. After the + first replay of the recorded key sequence, I am no longer able to + play it back. + +Register 0 contains the text from the last yank operation. In your recorded +key sequence, when the yank is performed, register 0 is overwritten with +the yanked text. So your recording stored in register 0 is lost. You have +to use some other register. + +For more information, read + + :help registers + + +============================================================================= + +SECTION 21 - AUTOCOMMANDS + + +21.1. How do I execute a command when I try to modify a read-only file? + +You can use the FileChangedRO autocommand event to execute a command when a +read-only file modified. For example, you can use this event to checkout a +read-only file: + + :autocmd FileChangedRO * call MyCheckoutFunction() + +For more information, read + + :help FileChangedRO + + +21.2. How do I execute a command every time when entering a buffer? + +You can use the BufEnter autocommand event to execute a command every time +when entering a buffer. For example: + + :autocmd BufEnter *.c set formatoptions=croqt + +For more information, read + + :help BufEnter + + +21.3. How do I execute a command every time when entering a window? + +You can use the WinEnter autocommand event to execute a command every time +when entering a window. For example: + + :autocmd WinEnter *.c call MyFunction() + +For more information, read + + :help WinEnter + + +21.4. From an autocmd, how can I determine the name of the file or the + buffer number for which the autocommand is executed? + +You can use the special words or in an autocmd to get the +name of the file or the buffer number for which the autocommand is +executed. + +For more information, read + + :help : + :help : + :help : + + +21.5. How do I automatically save all the changed buffers whenever Vim + loses focus? + +You can define an autocommand for the FocusLost event which will save all +the modified buffers whenever Vim loses focus: + + :autocmd FocusLost * wall + +For more information, read + + :help FocusLost + :help :wall + + +21.6. How do I execute/run a function when Vim exits to do some cleanup? + +You can use VimLeave autocmd event to execute a function just before Vim +exists. For example, + + :autocmd VimLeave * call MyCleanupFunction() + +For more information, read + + :help VimLeave + + +============================================================================= + +SECTION 22 - SYNTAX HIGHLIGHT + + +22.1. How do I turn off/on syntax highlighting? + +By default, the Vim syntax highlighting is turned off. To enable the syntax +highlighting, you can use one of the following commands: + + :syntax enable + + or + + :syntax on + +To disable the syntax highlighting, you can use the following command: + + :syntax off + +For more information, read + + :help 06.1 + :help 06.4 + :help :syntax-enable + :help :syntax-on + :help :syn-clear + + +22.2. How do I change the background and foreground colors used by Vim? + +Vim uses the "Normal" highlight group for the background and foreground +colors. To change the foreground/background colors, you have to modify the +"Normal" highlight group. For example, to set the background color to blue +and foreground color to white, you can use + + :highlight Normal ctermbg=blue ctermfg=white guibg=blue guifg=white + +If you are using the Motif or the Athena version of the GUI Vim, then you +can modify the foreground and background resource names in the .Xdefaults +files to change the colors: + + Vim.foreground: Black + Vim.backround: Wheat + +You can also use the "-foreground" and "-background" command-line arguments +to specify the foreground and background colors. These arguments are +supported only in the Motif or Athena versions: + + $ gvim -foreground Black -background Wheat + +For more information, read + + :help :highlight + :help .Xdefaults + :help -gui + + +22.3. How do I change the highlight colors to suit a dark/light background? + +You can set the 'background' option to either 'dark' or 'light' to change +the highlight colors to suit a dark/light background: + + :set background=dark + +For more information, read + + :help 'background' + :help 6.2 + + +22.4. How do I change the color of the line numbers displayed when the + ":set number" command is used? + +The line numbers displayed use the LineNr highlighting group. To display +the current colors used, use + + :hi LineNr + +To change the color modify the LineNr highlight group. For example: + + :hi linenr guifg=red guibg=black + +This will give red numbers on a black background in GVIM. + +For more information, read + + :help :highlight + + +22.5. How do I change the background color used for a Visually selected + block? + +You can modify the 'Visual' highlight group to change the color used for a +visually selected block: + + :highlight Visual guibg=red + +For more information, read + + :help :highlight + :help hl-Visual + + +22.6. How do I highlight the special characters (tabs, trailing spaces, end + of line, etc) displayed by the 'list' option? + +You can modify the "NonText" and "SpecialKey" highlight groups to highlight +the special characters displayed by the 'list' option: + + :highlight NonText guibg=red + :highlight SpecialKey guibg=green + +The "NonText" highlighting group is used for "eol", "extends" and +"precedes" settings in the "listchars" option. The "SpecialKey" +highlighting group is used for the "tab" and "trail" settings. + +For more information, read + + :help 'listchars' + :help hl-NonText + :help hl-SpecialKey + + +22.7. How do I specify a colorscheme in my .vimrc/.gvimrc file, so that Vim + uses the specified colorscheme everytime? + +You can specify the color scheme using the ":colorscheme" command in your +.vimrc or .gvimrc file: + + colorschme evening + +For more information, read + + :help :colorscheme + + +22.8. Vim syntax highlighting is broken. When I am editing a file, some + parts of the file is not syntax highlighted or syntax highlighted + incorrectly. + +Vim doesn't read the whole file to parse the text for syntax highlighting. +It starts parsing wherever you are viewing the file. That saves a lot of +time, but sometimes the colors are wrong. A simple fix is refreshing the +screen using the CTRL-L key. Or scroll back a bit and then forward again. +You can also use the command: + + :syntax sync fromstart + +Note that this might considerably slow down the screen refreshing. + +For more information, read + + :help :syn-sync + :help :syn-sync-first + + +22.9. Is there a built-in function to syntax-highlight the corresponding + matching bracket? + +No. Vim doesn't support syntax-highlighting matching brackets. You can try +using the plugin developed by Charles Campbell: + + http://vim.sourceforge.net/tips/tip.php?tip_id=177 + +You can jump to a matching bracket using the '%' key. You can set the +'showmatch' option to temporarily jump to a matching bracket when in insert +mode. + +For more information, read + + :help % + :help 'showmatch' + :help 'matchtime' + :help 'matchpairs' + + +22.10. How do I turn off the C comment syntax highlighting? + +You can use the following command to turn off C comment syntax +highlighting: + + :highlight clear comment + +For more information, read + + :help c-syntax + + +22.11. How do I add my own syntax extensions to the standard syntax files + supplied with Vim? + +You should not modify the syntax files supplied with Vim to add your +extensions. When you install the next version of Vim, you will lose your +changes. Instead you should create a file under the ~/.vim/after/syntax +directory with the same name as the original syntax file and add your +additions to this file. + +For more information, read + + :help mysyntaxfile-add + :help 'runtimepath' + + +22.12. How do I replace a standard syntax file that comes with the Vim + distribution with my own syntax file? + +You can replace a standary syntax file that comes with the Vim distribution +by creating a file with the same name as the original syntax file and +placing it in the vim runtime syntax (~/.vim/syntax) directory. For +example, to replace the c.vim syntax file in a Unix system, place the new +c.vim in the ~/.vim/syntax directory. In a MS-Windows system, place the new +syntax file in the $HOME/vimfiles/syntax or $VIM/vimfiles/syntax directory. + +For more information, read + + :help mysyntaxfile-replace + :help 44.11 + :help mysyntaxfile + + +22.13. How do I highlight all the characters after a particular column? + +You can use the ":match" command to highlight all the characters after a +particular column: + + :match Todo '\%>75v.\+' + +This will highlight all the characters after the 75th column. + +For more information, read + + :help :match + :help /\%v + :help /\+ + :help /. + + +22.14. How do I convert a source file (.c, .h, etc) with the Vim syntax + highlighting into a HTML file? + +You can use the 2html.vim script to convert a source file into a HTML file +with the Vim syntax highlighting. Use the following command: + + :runtime! syntax/2html.vim + +For more information, read + + :help convert-to-HTML + + +22.15. How do I list the definition of all the current highlight groups? + +You can list the definition of all the current highlight groups using the +":highlight" (without any arguments) ex command. + +For more information, read + + :help :highlight + + +============================================================================= + +SECTION 23 - VIM SCRIPT WRITING + + +23.1. How do I list the names of all the scripts sourced by Vim? + +You can use the ":scriptnames" command to list the names of all the scripts +sourced by Vim: + + :scriptnames + +For more information, read + + :help :scriptnames + + +23.2. How do I debug Vim scripts? + +Vim has built-in support for a primitive debugger to debug Vim plugins and +scripts. Using this debugger you can set breakpoints and step through the +plugin functions. + +For more information, read + + :help debug-scripts + :help -D + + +23.3. How do I locate the script/plugin which sets a Vim option? + +You can use the ":verbose" command to locate the plugin/script which last +modified a Vim option. For example: + + :verbose set textwidth? + +For more information, read + + :help :set-verbose + :help :verbose + + +23.4. I am getting some error/informational messages from Vim (possibly + when running a script), the messages are cleared immediately. How do + I display the messages again? + +You can use the ":messages" command to display the previous messages. + + :messages + +For more information, read + + :help :messages + :help :echoerr + :help :echomsg + :help message-history + + +23.5. How do I save and restore a plugin specific information across Vim + invocations? + +Vim will save and restore global variables that start with an uppercase +letter and don't contain a lower case letter. For this to work, the +'viminfo' option must contain the '!' flag. Vim will store the variables in +the viminfo file. + +For more information, read + + :help 'viminfo' + :help viminfo-file + :help variables + + +23.6. How do I start insert mode from a Vim function? + +You can use the ":startinsert" command to start the insert mode from inside +a Vim function. + +For more information, read + + :help :startinsert + + +23.7. How do I change the cursor position from within a Vim function? + +You can use the cursor() function to position the cursor. + + call cursor(lnum, col) + +You can also use the following command to change the cursor position: + + exe "normal! " . lnum . "G" . col . "|" + +For more information, read + + :help cursor() + :help bar + + +23.8. How do I check the value of an environment variable in the .vimrc + file? + +You can use prefix the environment variable name with the '$' character to +use it from a Vim script/function. You can refer to the value of an +environment variable using the $env_var syntax: + + if $EDITOR == 'vi' + endif + +For more information, read + + :help expr-env + + +23.9. How do I check whether an environment variable is set or not from a + Vim function? + +You can use the exists() function to check for the existence of a +environment variable. + + if exists("$MY_ENV_VAR") + endif + +For more information, read + + :help exists() + :help expr-env + + +23.10. How do I call/use the Vim built-in functions? + +You can use the ":call" command to invoke a Vim built-in function: + + :call cursor(10,20) + +You can use the ":echo" command to echo the value returned by a function: + + :echo char2nr('a') + +You can use the ":let" command to assign the value returned by a function +to a variable: + + :let a = getline('.') + +To store the return value from a function into a Vim register, you can use +the following command: + + :let @a = system('ls') + +The above command will store the return value from the 'ls' command into +the register 'a'. + +For more information, read + + :help :call + :help :echo + :help :let + :help :let-register + :help user-functions + :help usr_41.txt + + +23.11. I am using some normal mode commands in my Vim script. How do I + avoid using the user-defined mappings for these normal mode commands + and use the standard Vim functionality for these normal mode + commands? + +You can use the "normal!" command in your script to invoke a normal-mode +command. This will use the standard functionality of the normal mode +command and will not use the user-defined mapping. + +For more information, read + + :help :normal + + +23.12. How do I get the current visually selected text into a Vim variable + or register? + +You can get the current visually selected text into a Vim variable by +yanking the text into Vim register and then assigning the contents of the +register into the variable: + + :normal gvy + :let myvar = @" + +The above command copies the visually selected text into the variable +"myvar". + +You can also use the command: + + :normal! gv"*y + +In the above command, gv reselects the last visually selected text and the +rest of the command copies the selected text into the * (clipboard) +register. Alternatively, you can set the 'a' flag in the 'guioptions' +option to automatically copy a visually selected text into the * register. +To do this as part of a visual map, you can use a command similar to the +one shown below: + + :vmap "*y:call ... + +For more information, read + + :help gv + :help :normal + :help let-@ + :help quotestar + :help clipboard + :help registers + + +23.13. I have some text in a Vim variable 'myvar'. I would like to use this + variable in a ":s" substitute command to replace a text 'mytext'. + How do I do this? + +You can use the 'execute' command to evaluate the variable: + + :execute '%s/mytext/' . myvar . '/' + +For more information, read + + :help :execute + +You can also use "\=" in the substitute command to evaluate the variable: + + :%s/mytext/\=myvar/ + +For more information, read + + :help sub-replace-special + + +23.14. A Vim variable (bno) contains a buffer number. How do I use this + variable to open the corresponding buffer? + +The :buffer command will not accept a variable name. It accepts only a +buffer number or buffer name. You have to use the ":execute" command to +evaluate the variable into the corresponding value. For example: + + :execute "buffer " . bno + +For more information, read + + :help :execute + + +23.15. How do I store the value of a Vim option into a Vim variable? + +You can prefix the option name with the '&' character and assign the option +value to a Vim variable using the "let" command. For example, to store the +value of the 'textwidth' option into the Vim variable "old_tw", you can use +the following command: + + :let old_tw = &tw + +To do the opposite, to set the 'textwidth' option with the value stored in +the 'old_tw' variable, you can use the following command: + + :let &tw = old_tw + +For more information, read + + :help expr-option + :help let-option + + +23.16. I have copied and inserted some text into a buffer from a Vim + function. How do I indent the inserted text from the Vim function? + +You can use the following command to format the just inserted text: + + :normal '[='] + +For more information, read + + :help '[ + :help '] + :help = + :help :normal + + +23.17. How do I get the character under the cursor from a Vim script? + +You can use the getline() function and use string index [] to get the +character: + + :echo getline(".")[col(".") - 1] + +In the above command, getline(".") returns the text in the current line. +The indexing of the string starts at zero, and you can get a single +character in a string by its index with the "string[index]" notation. The +col(".") returns the column of the cursor position; the adjustment is to +get the right character of the string. + +For more information, read + + :help getline() + :help col() + :help expr-[] + + +23.18. How do I get the name of the current file without the extension? + +You can get the name of the current file without the extension using: + + :echo expand("%:r") + +With some commands, you can use the file name modifiers directly: + + :cd %:p:h + :!gcc -o %:r.o % + +For more information, read + + :help filename-modifiers + :help expand() + :help cmdline-special + :help fnamemodify() + + +23.19. How do I get the basename of the current file? + +You can use the :t filename modifier to get the basename of the current +file: + + :echo expand("%:t") + +For more information, read + + :help filename-modifiers + + +23.20. How do I get the output from a Vim function into the current buffer? + +You can insert the return value from a function using the following command +in insert mode: + + =MyFunc() + +Note that this will only insert the return value of the function. + +For more information, read + + :help i_CTRL-R + :help i_CTRL-R_CTRL-R + :help i_CTRL-R_CTRL-O + :help expression + + +23.21. How do I call external programs from a Vim function? + +There are several ways to call external programs from a Vim function. You +can use the builtin system() function to invoke external programs and get +the result: + + :let output = system("ls") + +You can also use "!" ex-command to run an external command. + +For more information, read + + :help system() + :help :! + :help 10.9 + + +23.22. How do I get the return status of a program executed using the ":!" + command? + +You can use the predefined Vim v:shell_error variable to get the return +status of the last run shell command. + +For more information, read + + :help v:shell_error + + +23.23. How do I determine whether the current buffer is modified or not? + +You can check the value of the 'modified' option to determine whether the +current buffer is modified: + + :set modified? + +From a Vim script, you can check the value of the 'modified' option: + + if &modified + echo "File is modified" + endif + +For more information, read + + :help 'modified' + + +23.24. I would like to use the carriage return character in a normal + command from a Vim script. How do I specify the carriage return + character? + +You can use the ":execute" command to specify the special (control) +character in a normal mode command: + + :execute "normal \" + :execute "normal ixxx\" + +For more information, read + + :help :execute + :help expr-quote + + +23.25. How do I split long lines in a Vim script? + +You can split long lines in a Vim script by inserting the backslash +character ("\") at the start of the next line. For example, + +For more information, read + + :help line-continuation + + +23.26. When I try to "execute" my function using the "execute 'echo + Myfunc()'" command, the cursor is moved to the top of the current + buffer. Why? + +The ":execute" command runs the normal mode command specified by the +argument. In the case of the following command: + + :execute "echo Myfunc()" + +The call to "echo Myfunc()" will return 0. The ":execute" command will run +the normal mode command "0", which moves the cursor to the top of the file. +To call a Vim function, you should use the ":call" command instead of the +":execute" command: + + :call Myfunc() + +For more information, read + + :help :call + :help :execute + :help :echo + :help user-functions + :help 41.5 + :help 41.6 + + +23.27. How do I source/execute the contents of a register? + +If you have yanked a set of Vim commands into a Vim register (for example +register 'a'), then you can source the contents of the register using one +of the following commands: + + :@a +or + :exe @a + +For more information, read + + :help :@ + + +23.28. After calling a Vim function or a mapping, when I press the 'u' + key to undo the last change, Vim undoes all the changes made by + the mapping/function. Why? + +When you call a function or a mapping, all the operations performed by the +function/mapping are treated as one single operation. When you undo the +last operation by pressing 'u', all the changes made by the +function/mapping are reversed. + +For more information, read + + :help undo-redo + :help map-undo + + +23.29. How can I call a function defined with s: (script local function) + from another script/plugin? + +The s: prefix for a Vim function name is used to create a script local +function. A script local function can be called only from within that +script and cannot be called from other scripts. To define a function in a +script/plugin, so that it can be called from other plugins/scripts, define +the function without the s: prefix. + +For more information, read + + :help script-variable + :help script-local + :help :scriptnames + + +23.30. Is it possible to un-source a sourced script? In otherwords, reverse + all the commands executed by sourcing a script. + +No. It is not possible to reverse or undo all the commands executed by +sourcing a script. + +For more information, read + + :help :source + + +23.31. How do I get the character under the cursor? + +You can use the getline() function to retrieve the current line and then +use the col() function to index into the returned text. For example, + + :echo getline(".")[col(".") - 1] + +will echo the character under the cursor. + +For more information, read + + :help expr-[] + :help getline() + :help col() + + +============================================================================= + +SECTION 24 - PLUGINS + + +24.1. How do I set different options for different types of files? + +You can create filetype plugins to set different options for different +types of files. You should first enable filetype plugins using the command: + + :filetype plugin on + +A filetype plugin is a vim script that is loaded whenever Vim opens or +creates a file of that type. For example, to ensure that the 'textwidth' +option is set to 80 when editing a C program (filetype 'c'), create one of +the following files: + + ~/.vim/ftplugin/c.vim (Unix) + %HOME%\vimfiles\ftplugin\c.vim (Windows) + +with the following text in it: + + setlocal textwidth=80 + +You can also use autocommands to set specific options when editing specific +type of files. For example, to set the 'textwidth' option to 75 for only +*.txt files, you can use the following autocmd: + + autocmd BufRead *.txt setlocal textwidth=80 + +For more information, read + + :help filetype-plugin + :help add-filetype-plugin + :help autocmd + :help 40.3 + + +24.2. I have downloaded some Vim plugins, syntax files, indent files, color + schemes, filetype plugins, etc from the web. Where should I copy + these files so that Vim will find them? + +You can place the runtime files (plugins, syntax files, indent files, color +schemes, filetype plugins, etc) under one of the directories specified by +the 'runtimepath' option. For Unix systems, this is usally the "$HOME/.vim" +directory. For MS-Windows systems, this is usually the $VIM\vimfiles or +$HOME\vimfiles directory. Depending on the type of the runtime file, you +have to place it under a specific directory under the above runtime +directory. The names of the directories are listed below: + + colors/ - color scheme files + compiler/ - compiler files + doc/ - documentation + ftplugin/ - filetype plugins + indent/ - indent scripts + keymap/ - key mapping files + lang/ - menu translations + plugin/ - plugin scripts + syntax/ - syntax files + tutor/ - files for vimtutor + +For more information, read + + :help your-runtime-dir + :help 'runtimepath' + :help :runtime + + +24.3. How do I extend an existing filetype plugin? + +You can extend an existing filetype plugin by creating a file under either +the $VIMRTUNTIME/after/ftplugin or the $VIMRTUNTIME/ftplugin directory. The +name of the file should be the same as the name of the existing filetype +plugin file. You can place your additions to the new file. + +If you placed the file in the after/ftplugin runtime directory, then Vim +will first source the existing filetype plugin file and then will source +the new file. If you placed the file in the $VIMRTUNTIME/ftplugin runtime +directory, then Vim will first source the new file and then will source the +existing filetype plugin file. + +For more information, read + + :help ftplugin-overrule + :help filetype-plugin + :help add-filetype-plugin + :help 'runtimepath' + + +24.4. How do I turn off loading the Vim plugins? + +You can reset the 'loadplugins' option to turn off loading the plugins: + + :set noloadplugins + +You can also specify the "--noplugin" command line argument to stop loading +the plugins: + + $ vim --noplugin + +For more information, read + + :help 'loadplugins' + :help --noplugin + :help load-plugins + + +24.5. How do I turn on/off loading the filetype plugins? + +By default, Vim will not load the filetype plugins. You can configure Vim +to load filetype plugins using the command: + + filetype plugin on + +You can turn off loading the filetype plugins using: + + filetype plugin off + +For more information, read + + :help filetype-plugin-on + :help filetype-plugin-off + :help :filetype + + +24.6. How do I override settings made in a file type plugin in the global + ftplugin directory for all the file types? + +You can use an autocommand triggered on the FileType event: + + au Filetype * set formatoptions=xyz + +This should at least be after "filetype on" in your vimrc. Best is to put +it in your "myfiletypefile" file, so that it's always last. + +If you want to override a setting for a particular filetype, then create a +file with the same name as the original filetype plugin in the +~/.vim/after/ftplugin directory For example, to override a setting in the +c.vim filetype plugin, create a c.vim file in the ~/.vim/after/ftplugin +directory and add your preferences in this file. + +For more information, read + + :help ftplugin-overrule + :help ftplugins + :help myfiletypefile + + +24.7. How do I disable the Vim directory browser plugin? + +To disable the directory browsing Vim plugin, add the following line to +your .vimrc file: + + let loaded_explorer = 1 + +For more information, read + + :help file-explorer + + +24.8. How do I set the filetype option for files with names matching a + particular pattern or depending on the file extension? + +You can set the 'filetype' option for files with names matching a +particular pattern using an autocmd. For example, to set the 'filetype' +option to 'c' for all files with extension '.x', you can use the following +autocmd: + + autocmd! BufRead,BufNewFile *.x setfiletype c + +A better alternative to the above approach is to create a filetype.vim file +in the ~/.vim directory (or in one of the directories specified in the +'runtimepath' option) and add the following lines: + + " my filetype file + if exists("did_load_filetypes") + finish + endif + augroup filetypedetect + au! BufRead,BufNewFile *.x setfiletype c + augroup END + +For more information, read + + :help new-filetype + :help 43.2 + :help :setfiletype + + +============================================================================= + +SECTION 25 - EDITING PROGRAM FILES + + +25.1. How do I enable automatic indentation for C/C++ files? + +You can enable file-type based indentation using: + + :filetype indent on + +If you want to only enable automatic C indentation, then use: + + :set cindent + +For more information, read + + :help 'cindent' + :help C-indenting + :help filetype + + +25.2. How do I configure the indentation used for C/C++ files? + +You can configure the Vim C indentation by modifying the value of the +'cinoptions', 'cinkeys' and 'cinwords' options. + +For more information, read + + :help 'cindent' + :help 'cinoptions' + :help 'cinkeys' + :help 'cinwords' + :help C-indenting + :help cinoptions-values + :help 'smartindent' + + +25.3. How do I turn off the automatic indentation feature? + +By default, the automatic indentation is not turned on. You must have +configured Vim to do automatic indentation in either .vimrc or .gvimrc +files. You can disable automatic indentation using either, + + :filetype indent off + +or + + :set nocindent + +Also, check the setting for the following options: + + :set autoindent? + :set smartindent? + :set indentexpr? + +For more information, read + + :help 'cindent' + :help filetype-indent-off + :help 'autoindent' + :help 'smartindent' + :help 'indentexpr' + + +25.4. How do I change the number of space characters used for the automatic + indentation? + +You can modify the 'shiftwidth' option to change the number of space +characters used for the automatic indentation: + + :set shiftwidth=4 + +For more information, read + + :help 'shiftwidth' + + +25.5. I am editing a C program using Vim. How do I display the definition + of a macro or a variable? + +You can use the [d command to display the definition of a macro and the [i +command to display the definition of a variable. + +For more information, read + + :help [d + :help [i + :help include-search + :help 29.4 + :help 29.5 + + +25.6. I am editing a C program using Vim. How do I jump to the beginning or + end of a code block from within the block? + +You can use '[{' command to jump to the beginning of the code block and ']} +to jump to the end of the code block from inside the block. + +For more information, read + + :help [{ + :help ]} + :help various-motions + + +25.7. Is there a way to turn off the "//" comment auto-insertion behavior + for C++ files? If I'm sitting on a line beginning with "//", then I + open a new line above or below it, Vim automatically inserts new "//" + chars. + +You can modify the value of the 'comments' option to stop Vim from +inserting the C++ comment character ("//") automatically. For example: + + :set comments=sr:/*,mb:*,el:*/ + +For more information, read + + :help 'comments' + :help format-comments + + +25.8. How do I add the comment character '#' to a set of lines at the + beginning of each line? + +First, select the first character in all the lines using visual block mode +(CTRL-V). Press 'I' to start inserting characters at the beginning of the +line. Enter the comment character and then stop the insert mode by pressing +. Vim will automatically insert the entered characters at the +beginning of all the selected lines. + +For more information, read + + :help visual-block + :help blockwise-operators + :help v_b_I + + +25.9. How do I edit a header file with the same name as the corresponding C + source file? + +You can use the following command to edit a header file with the same name +as the corresponding C source file: + + :e %:t:r.h + +You can use the following command to edit the file in a new split window: + + :sp %:t:r.h + +In the above commands, the percent sign expands to the name of the current +file. The ":t" modifier extracts the tail (last component) of the +filename. The ":r" modifier extracts the root of the filename. The .h is +appended to the resulting name to get the header filename. + +Another approach is to use the following command: + + :sfind %:t:r.h + +This command will search for the header file in the directories specified +in the 'path' option. + +For more information, read + + :help cmdline-special + :help filename-modifiers + :help :sfind + :help 'path' + + +25.10. How do I automatically insert comment leaders while typing comments? + +To automatically insert comment leaders while typing comments, add the 'r' +and 'o' flags to the 'formatoptions' option. + + :set formatoptions+=ro + +You may also want to add the 'c' flag to auto-wrap comments using the +'textwidth' option setting and the 'q' flag to format comments with the +"gq" command: + + :set formatoptions=croq + +For more information, read + + :help 30.6 + :help format-comments + :help 'comments' + :help fo-table + + +============================================================================= + +SECTION 26 - QUICKFIX + + +26.1. How do I build programs from Vim? + +You can use the ":make" command to build programs from Vim. The ":make" +command runs the program specified by the 'makeprg' option. + +For more information, read + + :help 30.1 + :help make_makeprg + :help 'makeprg' + :help 'makeef' + :help :make + :help quickfix + + +26.2. When I run the make command in Vim I get the errors listed as the + compiler compiles the program. When it finishes this list disappears + and I have to use the :clist command to see the error message again. + Is there any other way to see these error messages? + +You can use the ":copen" or ":cwindow" command to open the quickfix window +that contains the compiler output. You can select different error lines +from this window and jump to the corresponding line in the source code. + +For more information, read + + :help :copen + :help :cwindow + :help quickfix + + +============================================================================= + +SECTION 27 - FOLDING + + +27.1. How do I extend the Vim folding support? + +You can use the 'foldexpr' option to fold using an user specified function. +For example, to fold subroutines of the following form into a single line: + + sub foo { + my $barf; + $barf = 3; + return $barf; + } + +You can use the following commands: + + set foldmethod=expr + set foldexpr=MyFoldExpr(v:lnum) + fun! MyFoldExpr(line) + let str = getline(a:line) + if str =~ '^sub\>' + return '1' + elseif str =~ '^}' + return '<1' + else + return foldlevel(a:line - 1) + endif + endfun + +For more information, read + + :help 'foldexpr' + :help fold-expr + + +27.2. When I enable folding by setting the 'foldmethod' option, all the + folds are closed. How do I prevent this? + +You can set the 'foldlevelstart' option to a particular value to close only +folds above the specified value. + + :set foldlevelstart=99 + +For more information, read + + :help 'foldlevelstart' + :help 'foldlevel' + :help fold-foldlevel + + +27.3. How do I control how many folds will be opened when I start editing a + file? + +You can modify the 'foldlevelstart' option to control the number of folds +that will be opened when you start editing a file. To start editing with +all the folds closed: + + :set foldlevelstart=0 + +For more information, read + + :help 'foldlevelstart' + + +27.4. How do I open and close folds using the mouse? + +You can click on the + and - characters displayed at the leftmost column to +open and close fold. For this to work, you have to set the 'foldcolumn' +to a value greater than zero: + + :set foldcolumn=2 + +For more information, read + + :help 'foldcolumn' + + +27.5. How do I change the text displayed for a closed fold? + +You can use the 'foldtext' option to change the text displayed for a closed +fold. + +For more information, read + + :help 'foldtext' + :help fold-foldtext + :help 'fillchars' + + +27.6. How do I store and restore manually created folds across different + Vim invocations? + +You can use the ":mkview" command to store manually created folds. Later, +you can use the ":loadview" command to restore the folds. For this to work, +the 'viewoptions' must contain "folds". + +For more information, read + + :help 28.4 + :help :mkview + :help :loadview + :help 'viewoptions' + :help 'viewdir' + :help :mksession + :help 'sessionoptions' + + +============================================================================= + +SECTION 28 - VIM WITH EXTERNAL APPLICATIONS + + +28.1. Can I run a shell inside a Vim window? + +Currently Vim doesn't have support for running shell and other external +commands inside a Vim window. + +For more information, read + + :help shell-window + +Alternatively, you can try using the Unix "screen" utility or the 'splitvt' +program. + +You can also use the vimsh plugin by Brian Sturk to run a shell in a Vim +window. To use this you need to have Vim built with python support. For +more information visit the following URL: + + http://vim.sourceforge.net/scripts/script.php?script_id=165 + + +28.2. How do I pass the word under the cursor to an external command? + +You can use the special keyword to pass the word under the cursor +to an external command. For example: + + :!dict + +For more information, read + + :help + + +28.3. How do I get the output of a shell command into a Vim buffer? + +You can use the ":r !" command to get the output of a shell command into a +Vim buffer: + + :r !ls + +For more information, read + + :help :r! + + +28.4. How do I pipe the contents of the current buffer to a external + command and replace the contents of the buffer with the output from + the command? + +You can use the :! command to pipe the contents of the current buffer to a +external command and replace the contents of the buffer with the output +from the command. For example, to sort the contents of the current buffer, +you can use the following command: + + :%!sort + +For more information, read + + :help :range! + + +28.5. How do I sort a section of my file? + +You can pipe the section of the file to the "sort" utility to sort the +file. For example: + + :5,100!sort + +You can also use a visual block, and use !sort on it. + + +28.6. Is there a step-by-step guide for using Vim with slrn? + +Visit the following link to get information about using Vim with Slrn: + + http://thingy.apana.org.au/~fun/slrn/ + + +28.7. How do I use Vim as a pager? + +You can use Vim as a pager using the $VIMRUNTIME/macros/less.sh shell +script, supplied as part of the standard Vim distribution. This shell +script uses the $VIMRUNTIME/macros/less.vim Vim script to provide less like +key bindings. + +For more information, read + + :help less + + +28.8. How do I view Unix man pages from inside Vim? + +You can view Unix man pages, inside Vim, using the man.vim plugin supplied +as part of the standard Vim distribution. To use this plugin, add the +following line to your startup vimrc file: + + runtime ftplugin/man.vim + +You can also press the K key to run the program specified by the +'keywordprg' option with the keyword under the cursor. By default, +'keywordprg' is set to run man on the keyword under the cursor. + +For more information, read + + :help man-plugin + :help K + :help 'keywordprg' + + +28.9. How do I change the diff command used by the Vim diff support? + +By default, the Vim diff support uses the 'diff' command. You can change +this by changing the 'diffexpr' option. + +For more information, read + + :help diff-diffexpr + :help 'diffexpr' + + +28.10. How do I use the Vim diff mode without folding? + +You can use the following command-line to start Vim with two filenames +and use the diff mode without folding: + + $ vim -o file1 file2 "+windo set diff scrollbind scrollopt+=hor nowrap" + +If you like vertically split windows, then replace "-o" with "-O". + +For more information, read + + :help vimdiff + + +============================================================================= + +SECTION 29 - GUI VIM + + +29.1. How do I create buffer specific menus? + +Adding support for buffer specific menus is in the Vim TODO list. In the +mean time, you can try Michael Geddes's plugin, buffermenu.vim: + + http://vim.sourceforge.net/scripts/script.php?script_id=246 + + +29.2. How do I change the font used by GUI Vim? + +You can change the 'guifont' option to change the font used by GUI Vim. To +display the current value of this option, you can use + + :set guifont? + +You can add the displayed font name to the .vimrc file to use the font +across Vim sessions. For example, add the following line to the .vimrc file +to use Andale Mono font. + + set guifont=Andale_Mono:h10:cANSI + +For Win32, GTK and Photon version of Vim, you can use the following command +to bringup a dialog which will help you in changing the guifont: + + :set guifont=* + +You can also use the -font Vim command line option to specify the font used +for normal text. + +For more information, read + + :help 'guifont' + :help 'guifontset' + :help 'guifontwide' + :help font-sizes + :help -font + :help -boldfont + :help -italicfont + :help -menufont + :help -menufontset + + +29.3. When starting GUI Vim, how do I specify the location of the GVIM + window? + +You can use the "-geometry" command line argument to specify the location +of the GUI Vim window. For example: + + $ gvim -geometry 80x25+100+300 + +For more information, read + + :help 31.4 + :help -geom + + +29.4. How do I add a horizontal scrollbar in GVim? + +You can enable the horizontal scrollbar by modifying the 'guioptions' +option: + + :set guioptions+=b + +For more information, read + + :help 'guioptions' + :help gui-horiz-scroll + + +29.5. How do I make the scrollbar appear in the left side by default? + +You can add the 'l' flag to the 'guioptions' option to make the scrollbar +appear in the left side. + + :set guioptions+=l + :set guioptions-=r + +For more information, read + + :help 'guioptions' + :help gui-scrollbars + + +29.6. How do I remove the Vim menubar? + +You can remove the Vim menubar by removing the 'm' flag from the +'guioptions' option: + + :set guioptions-=m + +For more information, read + + :help 'guioptions' + + +29.7. I am using GUI Vim. When I press the ALT key and a letter, the menu + starting with that letter is selected. I don't want this behavior as + I want to map the ALT- combination. How do I do this? + +You can use the 'winaltkeys' option to disable the use of the ALT key to +select a menu item: + + :set winaltkeys=no + +For more information, read + + :help 'winaltkeys' + :help :simalt + + +29.8. Is it possible to scroll the text by dragging the scrollbar so that + the cursor stays in the original location? + +The way Vim is designed, the cursor position has to be in a visible spot in +normal, visual, select and insert mode. This cannot be changed without +modifying Vim. When the scrollbar is used, the cursor will be moved so that +it is always visible. Another approach to solving this problem is to use +the Vim marks. You can mark the current cursor position using ma. Then +scroll to a different part of the text and jump back to the old position +using `a. You can also try the following suggestion from the Vim Online +website: + + http://www.vim.org/tip_view.php?tip_id=320 + +For more information, read + + :help mark-motions + + +29.9. How do I get gvim to start browsing files in a particular directory + when using the ":browse" command? + +You can set the 'browsedir' option to the default directory to use for the +":browse" command. + + :set browsedir='' + +For more information, read + + :help 'browsedir' + + +29.10. For some questions, like when a file is changed outside of Vim, Vim + displays a GUI dialog box. How do I replace this GUI dialog box with + a console dialog box? + +You can set the 'c' flag in the 'guioptions' option to configure Vim to use +console dialogs instead of GUI dialogs: + + :set guioptions+=c + +For more information, read + + :help 'guioptions' + + +29.11. I am trying to use GUI Vim as the editor for my xxx application. + When the xxx application launches GUI Vim to edit a file, the + control immediately returns to the xxx application. How do I start + GUI Vim, so that the control returns to the xxx application only + after I quit Vim? + +You have to start GUI Vim with the '-f' (foreground) command line option: + + $ gvim -f + +By default, GUI Vim will disconnect from the program that started Vim. With +the '-f' option, GUI Vim will not disconnect from the program that started +it. + +For more information, read + + :help gui-fork + :help -f + + +29.12. Why does the "Select Font" dialog doesn't show all the fonts + installed in my system? + +Vim supports only fixed width (mono-spaced) fonts. Proportional fonts are +not supported. In the "Select Font" dialog, only fixed width fonts will be +displayed. + +For more information, read + + :help font-sizes + :help 'guifont' + + +29.13. How do I use the mouse in Vim command-line mode? + +You can set the 'c' flag in the 'mouse' option to use mouse in the Vim +command-line mode: + + :set mouse+=c + +For more information, read + + :help mouse-using + :help gui-mouse + :help 09.2 + + +29.14. When I use the middle mouse button to scroll text, it pastes the + last copied text. How do I disable this behavior? + +You can map the middle mouse button to to disable the middle mouse +button: + + :map + :map! + +For more information, read + + :help gui-mouse-mapping + :help + + +29.15. How do I change the location and size of a GUI Vim window? + +You can use the "winpos" command to change the Vim window position. To +change the size of the window, you can modify the "lines" and "columns" +options. + +For example, the following commands will position the GUI Vim window at the +X,Y co-ordinates 50,50 and set the number of lines to 50 and the number of +columsn to 80. + + :winpos 50 50 + :set lines=50 + :set columns=80 + +For more information, read + + :help 31.4 + :help :winpos + :help 'lines' + :help 'columns' + :help GUIEnter + + +============================================================================= + +SECTION 30 - VIM ON UNIX + + +30.1. I am running Vim in a xterm. When I press the CTRL-S key, Vim + freezes. What should I do now? + +Many terminal emulators and real terminal drivers use the CTRL-S key to +stop the data from arriving so that you can stop a fast scrolling display +to look at it (also allowed older terminals to slow down the computer so +that it did not get buffer overflows). You can start the output again by +pressing the CTRL-Q key. + +When you press the CTRL-S key, the terminal driver will stop sending the +output data. As a result of this, it will look like Vim is hung. If you +press the CTRL-Q key, then everything will be back to normal. + +You can turn of the terminal driver flow control using the 'stty' command: + + $ stty -ixon -xoff + +or, you can change the keys used for the terminal flow control, using the +following commands: + + $ stty stop + $ stty start + + +30.2. I am seeing weird screen update problems in Vim. What can I do to + solve this screen/display update problems? + +You have to use a proper terminal emulator like xterm with correct TERM +settings (TERM=xterm) and a correct terminfo/termcap file. +For more information, read + + :help 'term' + + +30.3. I am using the terminal/console version of Vim. In insertmode, When I + press the backspace key, the character before the cursor is not + erased. How do I configure Vim to do this? + +You have to make sure that Vim gets the correct keycode for the backpspace +key. You can try using the command: + + :fixdel + +Make sure the TERM environment variable is set to the correct terminal +name. You can try using the 'stty' command: + + $ stty erase ^H + +where, you have to enter the ^H character by pressing the CTRL-V key and +then the CTRL-H key. + +For more information, read + + :help :fixdel + :help Linux-backspace + :help NetBSD-backspace + + +30.4. I am using Vim in a xterm. When I quit Vim, the screen contents are + restored back to the original contents. How do I disable this? + +The xterm has a capability called "alternate screen". If this capability +is present, vim switches to that alternate screen upon startup and back on +exit, thus restoring the original screen contents. To disable this +feature, add the following line to your .vimrc file: + + :set t_ti= t_te= + +For more information, read + + :help restorescreen + :help xterm-screens + + +30.5. When I start Vim, it takes quite a few seconds to start. How do I + minimize the startup time? + +This may be related to Vim opening the X display for setting the xterm +title and using the X clipboard. Make sure the DISPLAY variable is set to +point to the correct host. Try using the command line: + + $ vim -X + +This will prevent Vim from opening the X display. With this command-line +option, the X clipboard cannot be used and also Vim will not be able to +change the xterm title. + +You can also set the 'clipboard' option to + + :set clipboard=exclude:.* + +This has the same effect as using the -X command-line argument. + +For more information, read + + :help -X + :help 'clipboard' + + +30.6. How can I make the cursor in gvim in unix stop blinking? + +You can modify the 'guicursor' option, to stop the cursor from blinking. +For example: + + :set guicursor=a:blinkon0 + +For more information, read + + :help 'guicursor' + + +30.7. How do I change the menu font on GTK Vim? + +You can modify the ~/.gtkrc file to change the menu font on GTK Vim. For +example: + + style "default" + { font ="smooth09" } + class "*" style "default" + +The last line changes the font of all widgets. + +For more information, read + + :help gui-gtk + + +30.8. How do I prevent from suspending Vim? + +You can map to prevent the suspending. Here are some suggestions: + +- Make do nothing: + + :map + +- Make start a shell: + + :map :shell + +- Make give an error message: + + :map :"suspending disabled + +For the last example, the double quote is necessary in order to keep the +message on the status line. + + +30.9. When I kill the xterm running Vim, the Vim process continues to run + and takes up a lot of CPU (99%) time. Why is this happening? + +When Vim is built with support for Python interface, you will have this +problem. This is a known problem with the python thread library and Vim. To +solve this problem, use a Vim binary built without the Python interface. + +For more information, read + + :help +python + :help python + + +30.10. How do I get the Vim syntax highlighting to work in a Unix terminal? + +The easiest and simplest way to get Vim syntax highlighting is to use the +GUI version of Vim (GVIM). To get syntax highlighting to work in the +console/terminal version of Vim, you have to run a terminal emulator (like +Xfree86 xterm or rxvt or dtterm) that supports color. Note that if a +terminal emulator supports changing the background and foreground colors, +that does not mean that it also supports ANSI escape sequences for changing +the color. You can download the latest version of Xfree86 xterm from +http://dickey.his.com/xterm/xterm.html. You can download the latest version +of rxvt from http://www.rxvt.org. You have to install the terminfo/termcap +file that supports colors for the terminal emulator. Also, set the TERM +environment variable to the correct name of the term that supports colors. + +You can use the colortest.vim script supplied with the Vim runtime +package to test the color setup. To use this script, follow these steps: + + :e $VIMRUNTIME/syntax/colortest.vim + :source % + +For more information, read + + :help 06.2 + :help terminal-colors + :help termcap-colors + :help startup-terminal + :help xterm-color + :help colortest.vim + + +============================================================================= + +SECTION 31 - VIM ON MS-WINDOWS + + +31.1. In MS-Windows, CTRL-V doesn't start the blockwise visual mode. What + happened? + +The mswin.vim script provides key mappings and options to make Vim behave +like a MS-Windows application. One of the keys mapped is CTRL-V which is +used for pasting text in MS-Windows applications. This will disable the use +of CTRL-V to start the blockwise visual mode. The mswin.vim script maps +CTRL-Q for staring the blockwise visual mode. So you can use CTRL-Q instead +of CTRL-V. + +For more information, read + + :help CTRL-V + :help CTRl-V-alternative + :help CTRL-Q + :help 10.5 + + +31.2. When I press the CTRL-Y key, it acts like the CTRL-R key. How do I + configure Vim to treat CTRL-Y as CTRL-Y? + +The mapping of the CTRL-Y key to the CTRL-R key is done by the mswin.vim +script. The mswin.vim script maps CTRL-Y to make Vim behave like a standard +MS-Windows application. This is explained in ":help CTRL-Y". You can either +comment out the line in mswin.vim that maps the CTRL-Y key or you can +remove the line in your .vimrc file that sources the mswin.vim script. + + +31.3. How do I start GUI Vim in a maximized window always? + +You can use the "simalt" command to maximize the Vim window. You can use +the GUIEnter autocmd to maximize the Vim window on startup: + + autocmd GUIEnter * simalt ~x + +For more information, read + + :help :simalt + :help GUIEnter + :help gui-win32-maximized + + +31.4. After doing some editing operations, Vim freezes. The cursor becomes + an empty rectangle. I am not able enter any characters. What is + happening? + +Most probably, you used the mouse wheel to scroll the text in Vim. There is +a known problem in using intellimouse mouse wheel with Vim. To avoid this +problem, disable Universal scrolling support for Vim. + +For more information, read + + :help intellimouse-wheel-problems + + +31.5. I am using Windows XP, the display speed of maximized GVim is very + slow. What can I do to speed the display updates? + +This may be due to the fact that you have enabled 'Smooth edges of screen +fonts' in the display properties. Try turning off font smoothing or try +changing the smoothing method to "Standard". + + +31.6. What are the recommended settings for using Vim with cygwin? + +You may want to set the following shell related Vim settings: + + :set shellcmdflag=-c + :set shellquote= + :set shellslash " Use the forward slash for expansion. + :set shellxquote=\" + :set shell=d:\cygwin\bin\bash.exe " Use the bash shell + :set shellpipe=2>&1| tee + :set shellredir=>%s 2>&1 + + +31.7. I am trying to use GNU diff with Vim diff mode. When I run the diff + from command line, it works. When I try to use the diff with Vim it + doesn't work. What should I do now? + +There is a problem with using GNU diff with Vim. You can try using the +GNU diff.exe built by Ron Aaron from the following link: + + http://www.mossbayeng.com/~ron/vim/builds.html + + +31.8. Is it possible to use Vim as an external editor for MS-Windows + Outlook email client? + +You can use the "cubiclevim" COM Add-In to use Vim as an external editor +for MS-Windows Outlook email client. Visit the following URL for more +information: + + http://sourceforge.net/projects/cubiclevim + +Note that currently this works only with MS-Office 2000 and XP. + + +31.9. I am using Vim to edit HTML files. How do I start internet explorer + with the current file to preview the HTML file? + +You can use the following command: + + :!start c:\progra~1\intern~1\iexplore.exe file://%:p + + +31.10. I would like to use Vim with Microsoft Visual Studio. How do I do + this? + +You have to download and use the OLE version of Vim (for example: +gvim61ole.zip). This file also contains instructions on how to use Vim with +Visual Studio. + +For more information, read + + :help MSVisualStudio + + +31.11. Where do I place the _vimrc and _gvimrc files? + +You can place the _vimrc and _gvimrc files under the directory pointed to +by the VIM environment variable. If you are sharing this system with other +users, then you can place the files in a directory and set the HOME +environment variable to this directory. + +For more information, read + + :help $HOME-use + :help _vimrc + + +31.12. Everytime I save a file, Vim warns about the file being changed + outside of Vim. Why? + +If you get the following warning message, everytime you save a file: + + WARNING: The file has been changed since reading it!!! + Do you really want to write to it (y/n)? + +then this problem could be related to a bug in MS-Windows on the day +daylight saving time starts. Vim remembers the timestamp of the file after +it was written. Just before the next write the timestamp is obtained again +to check if the file was changed outside of Vim. This works correctly, +except on the day daylight saving time starts. + +This problem will go away the next day after the day the daylight saving +time starts. + +For more information, read + + :help W11 + + +============================================================================= + +SECTION 32 - PRINTING + + +32.1. How do I print a file along with line numbers for all the lines? + +You can set the 'printoptions' option and use the ":hardcopy" command to +print your file: + + :set printoptions=number:y + :hardcopy + +For more information, read + + :help 'printoptions' + :help :hardcopy + + +32.2. How do I print a file with the Vim syntax highlighting colors? + +You can use the ":hardcopy" command to print a file with the Vim syntax +highlighting colors. You can also convert your file to a HTML file using +the 2html.vim script and print the HTML file. + +For more information, read + + :help syntax-printing + :help 2html.vim + :help :hardcopy + :help printing + + +============================================================================= + +SECTION 33 - BUILDING VIM FROM SOURCE + + +33.1. How do I build Vim from the sources on a Unix system? + +For a Unix system, follow these steps to build Vim from the sources: + +- Download the source and run-time files archive (vim-##.tar.bz2) from the + ftp://ftp.vim.org/pub/vim/unix directory. +- Extract the archive using the bzip2 and tar utilities using the command: + + $ bunzip2 -c | tar -xf - + +- Run the 'make' command to configure and build Vim with the default + configuration. +- Run 'make install' command to install Vim in the default directory. + +To enable/disable various Vim features, before running the 'make' command +you can run the 'configure' command with different flags to include/exclude +the various Vim features. To list all the available options for the +'configure' command, use: + + $ configure -help + +For more information, read + + :help install + + +33.2. How do I install Vim in my home directory or a directory other + than the default installation directory in Unix? + +To install Vim in a directory other than the default installation +directory, you have to specify the directory using the --prefix option +while running the configure script. + + $ ./configure --prefix=/users/xyz + +You can enable/disable various Vim feature by supplying different arguments +to the configure script. For more information about all these options, run + + $ ./configure --help + +For more information, read + + :help install-home + :help install + + +33.3. How do I build Vim from the sources on a MS-Windows system? + +For a MS-Windows system, Vim can be built using either the Visual C++ +compiler or the Borland C++ compiler or the Ming GCC compiler or the cygwin +gcc compiler. Follow these steps to build Vim from the sources for +MS-Windows: + +- Download the source (vim##src.zip), runtime (vim##rt.zip) and the extra + (vim-##-extra.tar.gz) archives from the ftp://ftp.vim.org/pub/vim/pc + directory. +- Extract the archives into a directory (for example, c:\vimsrc) +- Depending on the installed compiler, you can use the corresponding + makefile to build the Vim sources. For Visual C++ use the Make_mvc.mak + makefile, for borland C++ use the Make_bc5.mak makefile, for ming GCC use + the Make_ming.mak makefile, for cygwin gcc use the Make_cyg.mak makefile. + +Depending on whether you want to build the GUI version of Vim or the +console version of Vim, you have to pass different arguments to the +makefiles. After successfully building the sources, you can copy the +vim.exe or gvim.exe file to the desired directory along with the files from +the runtime archive. + +You can visit the following site for extensive information about building +Vim on a MS-Windows system using the various compilers: + + http://mywebpage.netscape.com/SharpPeople/vim/howto/index.html + +For more information, read + + :help install + + +33.4. The Vim help, syntax, indent files are missing from my Vim + installation. How do I install these files? + +The Vim help, syntax, indent and other runtime files are part of the Vim +runtime package. You need to download and install the Vim runtime package. +For example, for MS-Windows, the name of the Vim 6.1 runtime package is +vim61rt.zip. + +For more information, read + + :help install + + +33.5. I have built Vim from the source and installed the Vim package using + "make install". Do I need to keep the Vim source directory? + +No. Once you have built and installed Vim in some directory other than the +original source directory (for example, /usr/bin or /usr/local/bin), then +you can remove the source directory. + + +33.6. How do I determine the Vim features which are enabled at compile + time? + +You can use the ":version" command to determine the Vim features that are +enabled at compile time. The features that are enabled will be prefixed +with a "+". The features that are not enabled will be prefixed with a "-". + +If you want to test for a feature in a script, you can use the has() +function: + + if has("menu") + " Set up some menus + endif + +For more information, read + + :help :version + :help +feature-list + :help has() + + +33.7. Can I build Vim without the GUI support? + +Yes. You can build Vim by optionally enabling/disabling many of the +features including GUI. + +For more information, read + + :help install + + +33.8. When building Vim on a Unix system, I am getting "undefined reference + to term_set_winsize' error. How do I resolve this error? + +You will get this error when the build process is not able to locate the +termlib, termcap or ncurses library. You have to install the ncurses-dev +package to resolve this error. + + +33.9. Vim configure keeps complaining about the lack of gtk-config while + trying to use GTK 2.03. This is correct, since in GTK 2 they moved to + using the generic pkg-config. I can get pkg-config to list the + various includes and libs for gtk, but for some reason the configure + script still isn't picking this up. + +Use the following shell script named gtk-config: + + #!/bin/sh + pkg-config gtk+-2.0 $1 $2 + + +============================================================================= + +SECTION 34 - VARIOUS + + +34.1. How do I edit binary files with Vim? + +You can set the following options to edit binary files in Vim: + + :set binary + :set display=uhex + +You can also use the "-b" command-line option to edit a binary file: + + $ vim -b + +You can also use the xxd utility (part of the Vim distribution) to edit +binary files. + +For more information, read + + :help 23.4 + :help edit-binary + :help hex-editing + :help -b + :help 'binary' + :help 'endofline' + :help 'display' + + +34.2. When I invoke Vim, I get error messages about illegal characters in + the viminfo file. What should I do to get rid of these messages? + +You can remove the $HOME/.viminfo or $HOME/_viminfo file to get rid of +these error messages. + +For more information, read + + :help viminfo-errors + :help viminfo-file-name + :help viminfo + :help 21.3 + + +34.3. How do I disable the visual error flash and the error beep? + +You can disable both the visual error flash and the error beep using the +following command: + + :set visualbell t_vb= + +For more information, read + + :help 'visualbell' + :help 'errorbells' + :help t_vb + + +34.4. How do I display the ascii value of a character displayed in a + buffer? + +You can use the 'ga' command to display the ascii value of a displayed +character. + +For more information, read + + :help ga + :help :ascii + + +34.5. Can I use zero as a count for a Vim command? + +You cannot use zero as a count for a Vim command, as "0" is a command on +its own, moving to the first column of the line. + +For more information, read + + :help 0 + :help count + + +34.6. How do I disable the Vim welcome screen? + +You can disable the Vim welcome screen, by adding the 'I' flag to the +'shortmess' option: + + :set shortmess+=I + +For more information, read + + :help :intro + :help 'shortmess' + + +34.7. How do I avoid the "hit enter to continue" prompt? + +Vim will prompt you with the "hit enter to continue" prompt, if there are +some messages on the screen for you to read and the screen is about to be +redrawn. You can add the 'T' flag to the 'shortmess' option to truncate +all messages. This will help in avoiding the hit-enter prompt: + + :set shortmess+=T + +You can also increase the command height by setting the 'cmdheight' option: + + :set cmdheight=2 + +For more information, read + + :help hit-enter + :help avoid-hit-enter + :help 'shortmess' + :help 'cmdheight' + + +34.8. How do I invoke Vim from command line to run a group of commands on a + group of files? + +There are several ways to invoke Vim from command line to run a group of +commands on a group of files. You can use a set of "-c" command line +options to specify a group of commands: + + $ vim -c "" -c "" *.txt + +Each of the ex-command specified with the "-c" command line option is +executed one by one sequentially. You can also use a single "-c" command +line option and the "|" character to separate the ex commands: + + $ vim -c " | " *.txt + +In the above command, if an ex command fails, then all the remaining ex +commands will not be executed. + +You can store the group of commands into a file and use the "-s" command +line option to run the commands on a set of files. For example, if the +group of commands are stored in the file mycmds.txt, then you can use the +following command: + + $ vim -s mycmds.txt *.pl + +For more information, read + + :help -c + :help -s + + +34.9. How do I disable the viminfo feature? + +By default, the viminfo feature is disabled. If the viminfo feature is +enabled by a system-wide vimrc file, then you can disable the viminfo +feature by setting the 'viminfo' option to an empty string in your local +.vimrc file: + + :set viminfo="" + +For more information, read + + :help 'viminfo' + + +============================================================================= + +SECTION 35 - UNICODE +Author: Tony Mechelynck + + +35.1. Is it possible to create Unicode files using Vim? + +Yes. It may be more or less complicated depending on the keyboard and fonts +available to you, but it is always possible to encode any possible Unicode +codepoint (and some illegal ones) into a file. To create a Unicode file +using Vim, you should have compiled Vim with the "+multi_byte" compile-time +option. You can get more information about Unicode from the following +sites: + + http://www.unicode.org + http://www.cl.cam.ac.uk/~mgk25/unicode.html + +For more information, read + + :help multibyte + :help usr_45.txt + + +35.2. Which Vim settings are particularly important for editing Unicode + files? + +The most important are the various "encoding" options, i.e., 'encoding', +'fileencoding', 'fileencodings' and 'termencoding'. The boolean option +'bomb' is also significant. + +For more information, read + + :help 'encoding' + :help 'fileencoding' + :help 'fileencodings' + :help 'termencoding' + :help 'bomb' + + +35.3. What is the 'encoding' option? + +Basically, the 'encoding' option defines how Vim will represent your data +internally. However, all Unicode encodings are represented internally as +utf-8 and converted (if necessary) when reading and writing. + +For more information, read + + :help 'encoding' + + +35.4. How does Vim name the various Unicode encodings? + +Utf-8 is called utf-8 or utf8; utf-16 is called ucs-2 or ucs2; utf-32 is +called ucs-4 or ucs4. Also, you may specify endianness (except for utf-8 +which does not vary for endianness) by appending le for little-endian or be +for big-endian. If you create a file with an encoding of ucs-2 or ucs-4 +without specifying endianness, Vim will use what is typical of your +machine. + +For more information, read + + :help encoding-names + :help encoding-values + :help encoding-table + + +35.5. How does Vim specify the presence or absence of a byte-order mark? + +When reading a file, if the 'fileencodings' option includes "ucs-bom", Vim +will check for a byte-order mark. When writing a file, if the 'bomb' option +is set, Vim will write a byte-order mark on files whose encoding warrants +it. + +For more information, read + + :help 'fileencodings' + :help 'bomb' + + +35.6. What is the 'fileencoding' option? + +The 'fileencoding' option defines the particular encoding which Vim will +use to write a file. If empty, then the value of the 'encoding' option is +the default. + +For more information, read + + :help 'fileencoding' + + +35.7. What is the 'fileencodings' option? + +The 'fileencodings' option defines the heuristics used by Vim when opening +an existing file. It is a comma separated list of encodings. A special +name, "ucs-bom" is used to indicate that Vim should check for the presence +of a byte-order mark; however, it will not be recognised if it comes after +"utf-8". Normally, "ucs-bom" (if present) should be first in the list. + +When Vim opens a file, it checks it against the encodings listed in +'fileencodings'. The first one that matches is used. If there is no match, +then Vim sets 'fileencoding' to the null string, i.e., the value of +'encoding' will be used. + +For more information, read + + :help 'fileencodings' + :help 'encoding' + + +35.8. What is the 'termencoding' option? + +The 'termencoding' option defines how your keyboard encodes the data you +type. If empty, Vim assumes that it has the same value as 'encoding'. +Usually it should be set to something that matches your locale. + +For more information, read + + :help 'termencoding' + :help locale + + +35.9. What is the 'bomb' option? + +When reading a file with "ucs-bom" present in the 'fileencodings' option, +Vim will set the 'bomb' option on or off depending on the presence or +absence of a byte-order mark at the start of the file. When writing, Vim +will write a byte-order mark if the 'bomb' option is set. You may set or +unset it manually do make Vim write, or not write, the b.o.m. + +For more information, read + + :help 'bomb' + + +35.10. Where can I find an example of a typical use of all these options? + +There is a "tip", with explains them in different words with an example, at +http://vim.sourceforge.net/tip_view.php?tip_id=246 . + + +35.11. How can I insert Unicode characters into a file using Vim? + +Several methods are available: + +- Characters present on your keyboard can be typed in the usual way, even + those which require a "dead-key" prefix, like (for instance) the + circumflex on French keyboards. +- Characters for which a digraph is defined can be typed as two characters + prefixed by . +- If you have set the 'digraph' option, you can enter the characters for + which a digrph is defined as . +- Any character can be entered by using a prefix (or if + is remapped to paste from the clipboard). + +For more information, read + + :help digraphs + :help 'digraph' + :help i_CTRL-V_digit + + +35.12. How can I know which digraphs are defined and for which characters? + +First set the 'encoding' option properly (for instance, to utf-8), then use +the :digraphs command to list the currently defined digraphs. + +For more information, read + + :help :digraphs + :help 'encoding' + + +============================================================================= + +Current Maintainer: Yegappan Lakshmanan +Last updated on: 17 October 2003 + --- vim-7.0.orig/debian/changelog +++ vim-7.0/debian/changelog @@ -0,0 +1,4657 @@ +vim (1:7.0-164+1ubuntu2) feisty; urgency=low + + * Rebuild for python2.5 as the default python version. + + -- Matthias Klose Sun, 14 Jan 2007 16:25:53 +0000 + +vim (1:7.0-164+1ubuntu1) feisty; urgency=low + + * Resynchronise with Debian. Remaining changes: + + debian/runtime/debian.vim.in: + - disable autoindent and backup files + + patches/900_debcontrol.vim.diff: + - add restricted, universe, multiverse, and metapackages to allowed + sections + + patches/901_debchangelog.vim.diff: + - add breezy, dapper, edgy, feisty, *-proposed, *-updates, *-security, + *-backports, and dapper-commercial to allowed distributions + + patches/add-ubuntu-sources.diff: + - add restricted, universe, multiverse to allowed sections + - add dapper, edgy, feisty, *-proposed, *-updtaes, *-security, and + *-backports to allowed distributions + + patches/cindent-fix.patch: + - added again + + debian/control: + - drop lesstif2-dev from Build-Depends + - drop vim-lesstif package + - add libxt-dev to Build-Depends to fix build + + debian/rules: + - enable pythoninterpreter on basic builds + - skip -lesstif and -full variants + - remove references to vim-full package + - create a .pot file for translations + + debian/gvim.desktop: + - add NoDisplay=true + + -- Colin Watson Fri, 15 Dec 2006 12:15:18 +0000 + +vim (1:7.0-164+1) unstable; urgency=low + + [ Debian Vim Maintainers ] + * New upstream patches (159 - 164), see README.gz for details. + + [ James Vega ] + * Shipped tags file was being regenerated (closes: #397837) + - Do not pre-generate tags file, vim-runtime's postinst is already + handling tag generation + - Remove tags file in vim-runtime's postrm + * Add Provides: editor to the gvim variants. (closes: #398572) + * Remove the empty vim-variant.postrm. + * Move the Russian KOI8-R man pages to /usr/share/man/ru/man1 and remove the + utf8 man pages. man will handle the conversion. (closes: #368754) + + -- James Vega Wed, 15 Nov 2006 08:48:51 -0500 + +vim (1:7.0-158+1) unstable; urgency=medium + + [ Debian Vim Maintainers ] + * New upstream patches (153 - 158), see README.gz for details. + - Do not let the fold level become negative. (closes: #395413) + * Urgency medium since #396934 affects other packages. + + [ James Vega ] + * Add vim-runtime.postinst which runs helpztags so that we don't break the + help for other Vim addons everytime vim-runtime is upgraded. + (closes: #396934) + * Update the vim-basic install target in debian/rules to not rely on the + vimcurrent symlink before it has been setup. + + -- James Vega Mon, 6 Nov 2006 22:41:59 -0500 + +vim (1:7.0-152+1) unstable; urgency=low + + [ Debian Vim Maintainers ] + * New upstream patches (123 - 152), see README.gz for details. + - Correct the button order in the GTK+ file chooser dialog so that it + matches the GNOME Human Interface Guidelines. (closes: #367639) + + [ James Vega ] + * Bump vim-common's priority to important to match the override. + * Remove patch gui_gtk.c-abs_path.diff, merged upstream. + * Remove patch gui_xmebw.c-lesstif_crash.diff, merged upstream. + * Add patch html.vim-syntax_spell.diff, which adds support for highlighting + of spelling mistakes. (closes: #393347) + * Add patch changelog.vim-ftplugin_split-buffer.diff, which corrects an + invalid command used for opening the changelog in a split window. + (closes: #392840) + + [ Stefano Zacchiroli ] + * Added patch dosini.vim-hash_comment.diff which adds support for # comments + in dosini syntax highlighting, thanks to Adeodato Simó. (closes: #378952) + * Added patch zh_TW.po-swap_recovery_typo.diff which fixes a typo in a + traditional Chinese message when editing a file for which a swap file + already exists. (closes: #347420) + * debian/control + - renamed svn info field to XS-Vcs-Svn, to match the forthcoming official + name + + -- Stefano Zacchiroli Wed, 25 Oct 2006 17:07:37 +0200 + +vim (1:7.0-122+1ubuntu1) feisty; urgency=low + + * Resynchronise with Debian. + * patches/900_debcontrol.vim.diff: Add metapackages section. + * patches/901_debchangelog.vim.diff: Add dapper-proposed, edgy-proposed, + feisty, feisty-security, feisty-proposed, feisty-updates, and + feisty-backports targets. + * patches/add-ubuntu-sources.diff: Add feisty, *-proposed, and *-backports + distributions. + + -- Colin Watson Fri, 27 Oct 2006 11:57:31 +0100 + +vim (1:7.0-122+1) unstable; urgency=medium + + [ Debian Vim Maintainers ] + * New upstream patches (095 - 122), see README.gz for details. + * Urgency medium for RC bug fixes. + + [ James Vega ] + * Since vim-gui-common no longer depends on vim-common (to allow for + binNMUing), make /usr/share/doc/vim-gui-common a directory instead of a + symlink to /usr/share/doc/vim-common. (closes: #387794) + * Add versioned Conflicts/Replaces against vim-doc for vim to allow proper + upgrades from Sarge. (closes: #381526) + * Update debian/copyright with the license information for the user and + reference manuals. + * Add patch zsh.vim-nested_quotes.diff, which fixes handling of single + quotes nested inside double quotes. (closes: #390911) + * Add a gnome-icon-theme Suggests for the packages which use a GTK/Gnome + GUI. + * Build vim-tiny with multibyte support. (closes: #361378) + * Add patch gui_gtk.c-abs_path.diff, which ensures the GTK file selection + dialog remembers the previously used directory. (closes: #368668) + * Add mp.vim-cmd_check.diff, which fixes an incorrect boolean check. + (closes: #384154) + + [ Stefano Zacchiroli ] + * Added patches perl.vim-ftplugin_perldoc.diff, + perl.vim-ftplugin_pydoc.diff, and ruby.vim-ftplugin_ri.diff, which trigger + usage of perldoc/pydoc/ri for keyword lookup on perl/python/ruby files. + (closes: #389332) + + -- James Vega Mon, 9 Oct 2006 19:37:58 -0400 + +vim (1:7.0-094+1) unstable; urgency=medium + + [ Debian Vim Maintainers ] + * New upstream patches (036 - 094), see README.gz for details. + * Urgency medium because of the fix to vim-lesstif's crash bug. + + [ James Vega ] + * Add patches/de.po.diff, which differentiates between "Delete" and + "Readonly" swap recovery messages for the German translation. + (closes: #379507) + * Update patches/scripts.vim.diff to add recognition of rst (including + rest2web) files as the filetype 'rst'. (closes: #382541) + * Update debian/rules to generate helptags for the plugins that are in + /usr/share/vim/addons. + * Add patches/gui_xmebw.c-lesstif_crash.diff, which fixes the crash bug when + invoking gvim from the vim-lesstif variant. Thanks Ben Hutchings! + (closes: #378721) + + [ Stefano Zacchiroli ] + * Modified patches/debchangelog.vim.diff so that when opening a changelog + the entry the cursor is on gets (recursively) unfolded. + * Added patches/filetype.vim-better_tex_vs_plaintex.diff, implementing + better recognition of tex vs plaintex filetype (namely it recognizes as + latex files containing sectioning commands). (closes: #384479) + * Added script upstream/patches/get_patches.py to automate downloading of + latest upstream patches. + * debian/control + - bumped Standards-Version to 3.7.2 (no changes needed) + - added X-Vcs-Svn field to source package + + -- Stefano Zacchiroli Sun, 10 Sep 2006 11:59:14 +0200 + +vim (1:7.0-035+1ubuntu5) edgy; urgency=low + + * Backport from Debian (James Vega, closes: Malone #66733): + - Build vim-tiny with multibyte support. (closes: #361378) + + -- Colin Watson Wed, 18 Oct 2006 18:43:57 +0100 + +vim (1:7.0-035+1ubuntu4) edgy; urgency=low + + * patches/901_debchangelog.vim.diff: Add *-backports and + dapper-commercial. + + -- Colin Watson Mon, 11 Sep 2006 15:52:54 +0100 + +vim (1:7.0-035+1ubuntu3) edgy; urgency=low + + * patches/901_debchangelog.vim.diff: Fix a couple of misplaced spaces so + that dapper and edgy-updates are highlighted properly. + + -- Colin Watson Mon, 11 Sep 2006 13:53:48 +0100 + +vim (1:7.0-035+1ubuntu2) edgy; urgency=low + + * patches/add-ubuntu-sources.diff: + + Add Ubuntu specific parts to the sources.list syntax highlighting. + Thanks to Karl Goetz for the patch (Ubuntu: #30796) + + -- Sebastian Dröge Sat, 22 Jul 2006 17:13:23 +0200 + +vim (1:7.0-035+1ubuntu1) edgy; urgency=low + + * Merge from debian unstable. + + -- Martin Pitt Wed, 12 Jul 2006 15:16:50 +0200 + +vim (1:7.0-035+1) unstable; urgency=low + + [ Debian Vim Maintainers ] + * New upstream patches (018 - 035), see README.gz for details. + + [ James Vega ] + * debian/control: Make Vim binNMUable. + * Rename the augroup in $VIMRUNTIME/debian.vim so it doesn't conflict with + Vim's FileType autocmd event. + * Update patches/debcontrol.vim.diff to fix the package name regexp. + (closes: #375848) + * Update patches/debcontrol.vim.diff to include XS-Python-Version and + XB-Python-Version. (closes: #373661) + * Add patches/php.vim.diff, which removes the 'delete' keyword from PHP's + syntax highlighting. (closes: #368089) + + [ Stefano Zacchiroli ] + * Removed patch edit.c.diff, no longer needed after upstream patch 023 + + -- James Vega Mon, 3 Jul 2006 01:43:11 -0400 + +vim (1:7.0-017+8ubuntu2) edgy; urgency=low + + * Cleaned up cruft in debian/rules diff. + * Build vim-full, since we can build it in main. + * Restore old changelog entries. + * patches/901_debchangelog: Add *-security and *-updates pockets for Ubuntu + releases. + + -- Martin Pitt Thu, 29 Jun 2006 12:47:54 +0200 + +vim (1:7.0-017+8ubuntu1) edgy; urgency=low + + * Sync with Debian: + Remaining Ubuntu Changes + + debian/runtime/debian.vim.in: + - disable autoindent and backup files + + patches/debcontrol.vim.diff: + - add restricted, universe, multiverse to allowed sections + + patches/debsources.vim.diff: + - add restricted, universe, multiverse to allowed sections + - add dapper and edgy to allowed distributions + + patches/debchangelog.syntax.vim.diff: + - add breezy, dapper and edgy to allowed distributions + + debian/control: + - drop lesstif2-dev from Build-Depends + - drop vim-lesstif and vim-full packages + - add libxt-dev to Build-Depends to fix build + + debian/rules: + - enable pythoninterpreter on basic builds + - skip -lesstif and -full variants + - remove references to vim-full package + - create a .pot file for translations + + debian/gvim.desktop: + - add NoDisplay=true + + patch/cindent-fix.patch: + - added again + + -- Sebastian Dröge Wed, 28 Jun 2006 00:58:52 +0200 + +vim (1:7.0-017+8) unstable; urgency=medium + + * Rebuild with fixed libruby1.8. Urgency medium since vim-full and vim-ruby + can now be properly configured. + (closes: #373696, #373762, #373890, #374060) + + -- James Vega Sat, 17 Jun 2006 22:18:20 -0400 + +vim (1:7.0-017+7) unstable; urgency=low + + * Update $VIMRUNTIME/debian.vim and /etc/vim/vimrc.tiny to properly set + 'compatible' when vim-tiny is invoked as vi. (closes: #373680) + + -- James Vega Wed, 14 Jun 2006 23:18:11 -0400 + +vim (1:7.0-017+6) unstable; urgency=low + + [ Pierre Habouzit ] + * Add a Replace: vim-runtime to vim-common because of the vimcurrent mess, + that may prevent vim upgrade. (closes: #370012, #373117). + + [ James Vega ] + * Add vim-variant.preinst to remove any cruft left behind in + /usr/share/doc/vim{,-$variant}, which is now a symlink to + /usr/share/vim/vim-common. (closes: #369740) + * Update the build process so only vim-tiny starts in 'compatible' mode when + invoked as vi. + + Move patches/virc.c.diff to debian/tiny/vimrc.tiny.diff and apply only + when building vim-tiny. + + Rename /etc/vim/virc to /etc/vim/vimrc.tiny and add + vim-common.{post,pre}inst code to handle the conffile renaming. + * Update README.Debian to specify which package contains the vim policy and + the correct directory that holds vim policy. + * Add debchangelog.vim.diff which fixes an inifinite loop bug in the + debchangelog filetype plugin. (closes: #367566) + * Add scripts.vim.diff which adds recognition of ltrace output and sets the + filetype to 'strace'. (closes: #372926) + + -- James Vega Tue, 13 Jun 2006 11:06:59 -0400 + +vim (1:7.0-017+5) unstable; urgency=low + + [ James Vega ] + * Added po.vim.diff which locally enables line continuations while sourcing + the po.vim syntax file. (closes: #368589) + * Re-add /usr/share/vim/vimcurrent as a convenience symlink. + (closes: #369124) + * Add python.vim-ftplugin_include.diff which sets the 'include' option to a + stricter value to reduce the chance of mis-highlights. (closes: #367259) + * Add mysql.vim-syntax_comment.diff which corrects a syntax pattern for + MySQL comments. (closes: #367777) + + -- James Vega Wed, 31 May 2006 12:39:44 -0400 + +vim (1:7.0-017+4) unstable; urgency=low + + [ James Vega ] + * Added edit.c.diff which fixes a crash when exiting insert mode spell + completion. + * Revert changes to alternative handling in vim-variant.prerm. They should + only be removed during a remove, not an upgrade. (closes: #368175) + * Move the removal of stale alternatives to vim-variant.prerm where it + should've been to begin with. Also, tighten the matching done when + deciding which alternatives are removed. Only alternatives pointing to + /usr/bin/vim should be removed since those are the known stale + alternatives. + * Remove support for building spellfiles as will be moved to another set of + packages. + + debian/control: Remove Build-Depends-Indep which was only used for + spellfile building. + + debian/rules: Remove build-spell* and build-locales* targets. + + Remove debian/locale-gen + + Remove bg_BG.diff.diff and spell-locales.diff. + + -- James Vega Sat, 20 May 2006 21:57:31 -0400 + +vim (1:7.0-017+3) unstable; urgency=low + + [ James Vega ] + * Add support for building l10n spellfiles. + + Added unzip, aap, and locales to Build-Depends-Indep. + + Added debian/locale-gen to build the locale info. + + Update debian/rules to build spellfiles (temporarly disabled). + - Added a check for 'nospell' in DEB_BUILD_OPTIONS to prevent building + the spellfiles. + + Added spell-locales.diff patch which updates the aap recipes to set the + LC_ALL environment variable instead of LANG. + + Added bg_BG.diff.diff patch which fixes the line-endings in the + bg_BG.diff patch, allowing it to apply cleanly. + * Add /usr/share/vim/virc symlink, with this fix invoking vim as "vi" will + actually enable vim to behave differently than when invoked as "vim". + (closes: #367818) + + -- James Vega Thu, 18 May 2006 08:11:15 -0400 + +vim (1:7.0-017+2) unstable; urgency=low + + [ Debian Vim Maintainers ] + * Upload to unstable + + [ James Vega ] + * Update debian/vim-variant.prerm to remove alternative also during + upgrades. + * Add debian/vim-variant.preinst to cleanup alternatives left behind from + previous vim-variant.prerm scripts. + + -- Stefano Zacchiroli Tue, 16 May 2006 22:10:49 -0500 + +vim (1:7.0-017+1) experimental; urgency=low + + [ Debian Vim Maintainers ] + * New upstream patches (011 - 017), see README.gz for details. + + [ Stefano Zacchiroli ] + * Preliminary support for add-on infrastructure + + added symlinks from /usr/share/vim/addons/ to $VIMRUNTIME for the + matchit plugin, so that they are no longer version dependent + + added dir /var/lib/vim/addons/, now in the runtimepath + + added vim add-on registry entry for the matchit plugin + * Differentiated behaviour of Vim when invoked as "vi" + + added patch patches/virc.c.diff which source /etc/vim/virc when invoked + as such + + added debian/runtime/virc; it creates a vi-like environment setting + 'compatible' and nothing else + * Raised the alternative priority of vim.basic from 20 to 30. Rationale: the + relative order we want to achieve is vim.tiny < nvi < vim.basic + * vim-tiny is ready to enter the base system + + set vim-tiny priority to Important + + [ Norbert Tretkowski ] + * Removed outdated runtime files from package. + * Added s390x to debcontrolArchitecture in debcontrol.vim. (closes: #361281) + + -- Norbert Tretkowski Sat, 13 May 2006 13:23:35 -0500 + +vim (1:7.0-010+1) experimental; urgency=low + + [ Debian Vim Maintainers ] + * New upstream release (7.0) and patches (001 - 010), see README.gz for + details. (closes: #366396) + + CSS syntax highlighting properly handles non-UTF-8 aware environments. + (closes: #358734) + + crontab syntax highlighting recognizes % as starting stdin to the + cronjob. (closes: #363558) + + non-ASCII characters are properly handled when changing case in + :substitute commands. (closes: #266256) + + [ James Vega ] + * Massage the packaging back into "stable upstream releases" mode. + + Remove debian/watch since it isn't useful with Vim's method of releasing + stable updates. + + Swap out the unzip Build-Depends for bzip2. + + Update debian/rules to use the src/lang/extra tarballs instead of one + zip file. + + [ Stefano Zacchiroli ] + * handle debian/*.in files as autoconf files filling the @VIMCUR@ + placeholder with the appropriate vim string + * got rid of the /usr/share/vim/vimcurrent symlink, no longer needed now we + source debian.vim (closes: #366504) + * source vimrc.local/gvimrc.local from system-wide vimrc/gvimrc since a lot + of users have it, added a comment about that file being deprecated + * added a comment to system-wide gvimrc about how to obtain a reversed video + vim gui + + -- James Vega Thu, 11 May 2006 08:54:38 -0400 + +vim (1:6.4+7.0g01-1) experimental; urgency=low + + [ Debian Vim Maintainers ] + * New upstream snapshot (7.0g01). + + Remove 161_cmake-support.diff, merged upstream. + + Recognize zsh-beta as a shell that supports '2>&1| tee' for the + 'shellpipe' option. (closes: #362999) + + Assign filetype=php to any .php filename. (closes: #365055) + + Recognition in debcontrol's syntax file of all architectures listed at + http://www.debian.org/ports/ (closes: 364824) + + [ Stefano Zacchiroli ] + * Screening of patches no longer needed with vim7 & pushing upstream + of as many debian-specific patches as possible. Results: + + removed patches: 102_pythoncomplete.vim.diff, 104_debchangelog.vim.diff, + 106_fstab.vim.diff, 108_automake.vim.diff, 109_xdefaults.vim.diff, + 111_fstab.vim.diff, 119_php.vim.diff, 130_fstab.vim.diff, + 133_resolv.vim.diff, 136_muttrc.vim.diff, 140_muttrc.vim.diff, + 148_debchangelog.vim.diff, 157_slrnrc.vim.diff, 201_fr.po.diff, + 203_zh_TW.UTF8.po.diff + + The following runtime and translation files are now maintained upstream + in a best effort fashion (i.e. they are looking for a new maintainer) by + Debian VIM Maintainers: syntax/muttrc.vim, syntax/automake.vim, + syntax/php.vim, syntax/slrnrc.vim, lang/po/zh_TW.UTF-8.po. + + syntax/debchangelog.vim, syntax/debcontrol.vim, and syntax/tpp.vim are + now officially co-maintained upstream by Debian Vim Maintainers + * Improved comments and added more commented settings in /etc/vim/vimrc + + [ James Vega ] + * Add Replaces against manpages-it and manpages-pl since upstream now + provides i10n manpages. (closes: #364299) + * Moved Debian specific settings out from /etc/vim/{,g}vimrc, so that the + file can be (more) freely modified by sysadmins without risking merge + problems with maintainer updates. + + -- James Vega Wed, 3 May 2006 12:34:14 -0400 + +vim (1:6.4+7.0d03-1) experimental; urgency=low + + [ Debian Vim Maintainers ] + * New upstream snapshot (7.0d03). + + A lot of new features have been added, most notably: spell checking, + omni completion, tabs, undo branches, internal grep, location lists, + list/dictionary/funcref types for scripting. + See ":help version7" for more information. + + bugfixes affecting Debian's BTS: + - new version of sh.vim syntax highlighting (closes: #355273, #361813) + - respect LC_MESSAGES in menus (closes: #147757, #217217) + - consistent behaviour of 'gq' when an external formatter is used + (closes: #177735) + - improved wildcard expansion of filename patterns + (closes: #262645, #258150) + - german tutorial now shows instruction on how to proceed in the first + page (closes: #289115) + - fixed encoding of slovak translation (closes: #257342) + - proper escaping of characters in URLs (closes: #353076, #361317) + - added g:is_posix flag to sh.vim to enable highlighting of POSIX shell + scripts (closes: #361177) + + [ Stefano Zacchiroli ] + * Screening of patches no longer needed with vim7 & pushing upstream + of as many debian-specific patches as possible. Results: + + removed patches: 101_make.vim.diff, 103_sh.vim.diff, + 117_fortram.vim.diff, 122_html_indent.vim.diff, 135_debsources.vim.diff, + 145_fortran.vim.diff, 155_rst.vim.diff + + removed updates: debian/updates/debsources.vim + + -- James Vega Fri, 14 Apr 2006 13:29:49 -0400 + +vim (1:6.4+7.0c05-1) experimental; urgency=low + + [ Debian Vim Maintainers ] + * New upstream snapshot (7.0c05). + + Added support for bzr diffs in scripts.vim, thanks to Adeodato Simó. + (closes: #355922) + + Support python `as' keyword. (closes: #352885) + + [ James Vega ] + * Sync with the work that's been done on the 6.4 vim package. + * Add a missing quote in /etc/vim/vimrc's last-position-jump example. + (closes: #347597) + * Move vimtutor.1 to the same package (vim-runtime) as vimtutor. + Fixes a lintian warning. + * Add debian/watch. + * Cleanup handling of manpages and alternatives. (closes: 361845) + * debian/control: + + Remove references to obsolete packages. + + Move vim-doc to Section: doc. + + Update vim-common to Recommend all the vim variants. + + Add Build-Depends on libxpm-dev and unzip. + * debian/rules: + + Added support for running upstream's tests during the build process. + + Automatically generate the necessary .install/.links/.postinst settings + for installing the localized manpages. + + [ Pierre Habouzit ] + * Add support for cmake (from cmake.org). (closes: #357705) + * debcontrol.vim: add kfreebsd-amd64 to the ports list. + + [ Stefano Zacchiroli ] + * Screening of patches no longer needed with vim7 & pushing upstream + of as many debian-specific patches as possible. Results: + + removed patches: 102_filetype.vim.diff, 107_vim.1.diff, 107_xxd.1.diff, + 105_recognize-gnumakefile-am.diff, 123_accents.diff, + 133_filetype.vim.diff, 142_filetype.vim.diff, 153_filetype.vim.diff, + 154_svn.vim.diff, 156_scripts.vim.diff, 158_python.vim.diff, + 301_xxd.c.diff, 303_option.c.diff, 305_term.c.diff + * Added patch 102_pycomplete.vim: fixes a python omnicompletion bug when the + cursor is on an empty line + + [ Matthijs Mohlmann ] + * Updated debsources syntax file. + + Use debsources instead of sources. + + Make a regexpression of deb, deb-src, main, contrib and non-free. + + Remove setlocal iskeyword. + + Remove compatibility with vim 5.x. + + -- James Vega Fri, 31 Mar 2006 17:50:11 -0500 + +vim (1:6.4-007+1) unstable; urgency=low + + [ Debian VIM Maintainers ] + * New upstream patch (007), see README.gz for details. + + [ Stefano Zacchiroli ] + * Handle /usr/bin/gvim with alternatives, so that it can be configured + to a vim executable with gui support when /usr/bin/vim is configured + to one with no such support. (closes: #345765) + + [ Pierre Habouzit ] + * vim's syntax coloring mode should consider .sce extension. + (Closes: #338771) + * subversion commit log syntax and l10n. (Closes: #341288) + * dh_install bug #349070 triggerd our svn.vim problem. + (rebuild Closes: #348955). + * enhances syntax/rst.vim. (Closes: #323044) + + [ James Vega ] + * Move alternatives handling out of vim-common so that we aren't modifying + alternatives when the targets don't yet exist. (closes: #348233) + * Add 'armeb' to debcontrol syntax file. (closes: #350513) + * debian/rules: Remove all binaries except xxd from vim-common. Handle the + rest with alternatives in the variant packages. + * debian/control: Changed vim-gui-common to Arch: all + * Added patch 156_scripts.vim.diff which adds detection of svk diffs as diff + filetype. (closes: #349764) + * Added patch 157_slrnrc.vim.diff which adds a few more functions to the + slrnrc syntax file. (closes: #347801) + * Added commented out example autocmd for last-position-jump to + /etc/vim/vimrc. (closes: #347597) + * Lintian cleanup: + + debian/control: Added a Depends line for vim-common. + + debian/rules: Use proper permissions when installing the console font in + vim-runtime + + debian/rules: Create a symlink to /usr/share/doc/vim-gui-common for each + GUI variant package. This fixes a usr-doc-symlink-without-dependency + warning. + + -- James Vega Wed, 8 Feb 2006 15:11:37 -0500 + +vim (1:6.4-006+2ubuntu6) dapper; urgency=low + + * debian/rules: Create a POT file on build. + + -- Martin Pitt Tue, 23 May 2006 11:39:49 +0200 + +vim (1:6.4-006+2ubuntu5) dapper; urgency=low + + * Apply patch from Ryan Lortie to fix Ubuntu #44431. + * Also add edgy to the Ubuntu releases list. + + -- Scott James Remnant Thu, 18 May 2006 06:11:48 +0100 + +vim (1:6.4-006+2ubuntu4) dapper; urgency=low + + * Reduce the vim alternative to 35 priority, it was having ideas + somewhat above its station. + + -- Scott James Remnant Thu, 27 Apr 2006 23:21:42 +0100 + +vim (1:6.4-006+2ubuntu3) dapper; urgency=low + + * debian/updates/deb{control,sources}.vim: Add Ubuntu releases and + components. Thanks to Karl Goetz and + Barry deFreese for their initial patches. + Closes: LP#30796 + + -- Martin Pitt Wed, 26 Apr 2006 20:49:31 +0200 + +vim (1:6.4-006+2ubuntu2) dapper; urgency=low + + * Reenable vim-ruby since we can now build it in main. + + -- Daniel Silverstone Thu, 23 Mar 2006 12:32:25 +0000 + +vim (1:6.4-006+2ubuntu1) dapper; urgency=low + + * Synchronize with Debian unstable. + * Convert Ubuntu patches to use quilt. + * Re-register alternative for `editor'. + * Install .desktop file again, add attribute NoDisplay=true. + + -- Matthias Klose Thu, 2 Feb 2006 13:55:52 +0000 + +vim (1:6.4-006+2) unstable; urgency=low + + [ Norbert Tretkowski ] + * debian/README.Debian: fixed typos (closes: #344608) + * patches/148_debchangelog.vim.diff: added sarge-{backports|volatile} to + debchangelog hilighting + * debian/control: removed build-dependencies added for woody backport + * debian/control: build-depend on make (>= 3.80+3.81.b4) + + [ Matthijs Mohlmann and Stefano Zacchiroli ] + * debian/rules: moved "export DH_OPTIONS" back to the beginning of the + file since old versions of make can't cope with it on + target-specific variables. Fixes FTBFS on some archs. + (closes: #344658) + + [ Stefano Zacchiroli ] + * debian/rules: added 'export' target to generate source package + * debian/rules: uses quilt to manage debian-specific patches, changed + build-deps accordingly + * Added patch 152_javascript.vim which fixes JavaScript syntax + highlighting (closes: #343402) + + [ Pierre Habouzit ] + * debian/control: fix vim-gui-common description. (closes: #347912) + * 304_memline.c.diff causes FTBFS on Hurd, fix it. (closes: #348170) + + -- Norbert Tretkowski Sun, 15 Jan 2006 19:41:58 +0100 + +vim (1:6.4-006+1) unstable; urgency=low + + [ Debian VIM Maintainers ] + * New upstream patches (005 and 006), see README.gz for details. + + [ Stefano Zacchiroli ] + * Epoched all 6.4 versioned relationships in debian/control, they were + erroneously non-epoched. (closes: #344368, #344414) + + -- Norbert Tretkowski Fri, 23 Dec 2005 00:30:20 +0100 + +vim (1:6.4-004+2) unstable; urgency=low + + [ Norbert Tretkowski ] + * Applied patch from Adeodato Simó to fix broken syntax hilighting + of urgency in debchangelog.vim. (closes: #338557, #343136, #344228) + * No longer lists a mailinglist as uploader in changelog, until a consensus + about policy items 4.4 and 5.6.4 is found. (closes: #343073) + + [ Stefano Zacchiroli ] + * Fixed typo in vim-gui-common description. (closes: #343152) + * Remove old /usr/share/doc/vim-common symlink during vim-doc and + vim-common preinst phase. (closes: #343289) + * debian/rules: finally found the karma of target-specific variables, + hopefully the file is clearer now ... Fixes FTBFS on hppa. + (closes: #344150) + * Fixed dangling manpage symlinks in vim-gui-common. + (closes: #344179, #343195, #343171) + * Moved vimtutor from vim-common to vim-runtime + * Added patch 151_sed.vim which improves sed's syntax highlighting. + (closes: #336125) + * Added patch 305_term.c which fixes 'pastetoggle' for working + properly with F1-F4 keys on Debian xterm's. (closes: #342220) + + -- Norbert Tretkowski Wed, 21 Dec 2005 10:09:37 +0100 + +vim (1:6.4-004+1) unstable; urgency=low + + [ Debian VIM Maintainers ] + * New upstream patches (002 to 004), see README.gz for details. + + [ Stefano Zacchiroli ] + * Added back vim-tiny package. (closes: #222138) + * Reshaped vim packaging as follows: + - vim-common -> arch-dependent common files (variants w/o GUI) + - vim-gui-common -> arch-dependent common files (variants w GUI) + (closes: #338027) + - vim-runtime -> vim runtime (arch-independent) + - vim -> default variant + - vim-* -> other variants + - vim-tiny -> tiny variant, no vim-runtime dependency + - the above changes additionally got rid of circular dependency + vim -> vim-common -> vim (closes: #340037) + * Added symlink /usr/share/vim/vimcurrent -> vim64, will be kept + proper in future releases. /etc/vim/vimrc no longer version-aware. + * Removed duplicate /usr/share/vim/vimfiles entry in vimrc. + (closes: #337825) + * (Re-)Fixed debian/runtime/vimrc, last version inhibit /usr/bin/ex. + * au commands in vimrc executed only if has("autocmd"). + * No longer try to move configuration files from /etc to /etc/vim + (ancient preinst, no longer needed to support upgrades from sarge). + * Updated Description-s in debian/control. + * Check for and removal of old vim.org diversion in postinst instead + of postrm (closes: #341081) + * Adds gvim, when compiled with gnome support, as an alternative for + gnome-text-editor, with priority lower than gedit (closes: #287202) + * Substituted @PKG@ in menu entry for package name (closes: #342074) + + [ James Vega ] + * Added patch 148_debchangelog, update syntax/debchangelog.vim to + recognize infrequently used but policy compliant syntax. + (closes: #338557) + * Fixed patch 304_memline.c.diff to avoid inifinte loops resolving + symlinks. (closes: #336560) + * Remove the 'p' vmap in /etc/vim/vimrc since it has various bad + side-effects such as not being able to paste from a register while + in visual mode. + + [ Matthijs Mohlmann ] + * Updated syntax for sshd_config and ssh_config. + * Updated syntax highlighting for asterisk.vim (Closes: #338256) + + -- Debian VIM Maintainers Wed, 7 Dec 2005 22:02:34 +0100 + +vim (1:6.4-001+2) unstable; urgency=low + + [ Stefano Zacchiroli ] + * Fixed debian/runtime/vimrc, last version broke some plugins behaviour + (e.g. gzip, netrw) on files specified on cmdline. + + -- Debian VIM Maintainers Sun, 23 Oct 2005 16:03:43 +0200 + +vim (1:6.4-001+2ubuntu3) dapper; urgency=low + + * Drop GTK support in vim-basic again, to stop blowing out ubuntu-minimal. + + -- Adam Conrad Thu, 10 Nov 2005 12:28:39 -0500 + +vim (1:6.4-001+2ubuntu2) dapper; urgency=low + + * Remove .desktop items -- oops. + * Re-enable GTK support in vim-basic. + + -- Daniel Stone Fri, 28 Oct 2005 09:44:51 +1000 + +vim (1:6.4-001+2ubuntu1) dapper; urgency=low + + * Resync with Debian. + * Add 'dapper' to the list of supported distribution keywords. + * Drop patch #990, as it has been merged upstream. + + -- Daniel Stone Tue, 25 Oct 2005 07:57:58 +1000 + +vim (1:6.4-001+2) unstable; urgency=low + + [ Stefano Zacchiroli ] + * Fixed debian/runtime/vimrc, last version broke some plugins behaviour + (e.g. gzip, netrw) on files specified on cmdline. + + -- Debian VIM Maintainers Sun, 23 Oct 2005 16:03:43 +0200 + +vim (1:6.4-001+1) unstable; urgency=low + + [ Debian VIM Maintainers ] + * New upstream patch (001), see README.gz for details. + + [ Stefano Zacchiroli ] + * Got rid of conflicts among vim-* packages (aka variants) using + alternatives for /usr/bin/vim. (closes: #67823, #123959, #280934) + * Got rid of removal of /usr/doc/* symlinks. + * Added "sources" debian/rules target which downloads upstream tarballs. + * Added patch 146_netrw.vim.diff, fixes some issues of netrw.vim with + file://* URLs. (closes: #334868) + * Added patch 303_option.c.diff, which fixes 'system()' behaviour when + $SHELL is empty. (closes: #219386) + * Added patch 304_memline.c.diff, which fixes swap file locking wrt + symlinks. (closes: #329826) + * Changed debian/runtime/vimrc so that /etc/papersize is read without using + system(), fixes issues with exotic shells. (closes: #271338) + + [ James Vega ] + * Added patch 147_perl.vim.diff, new upstream syntax file which supersedes + 120_perl.vim.diff. + + -- Debian VIM Maintainers Sun, 23 Oct 2005 11:21:35 +0200 + +vim (1:6.4-000+1) unstable; urgency=low + + [ Debian VIM Maintainers ] + * New major upstream release (6.4). + + Fixed typo in /usr/share/vim/vim63/doc/usr_04.txt. (closes: #328664) + + [ Norbert Tretkowski ] + * Removed patches merged upstream: + + 118_ocaml.vim.diff + + -- Debian VIM Maintainers Sat, 15 Oct 2005 18:40:22 +0200 + +vim (1:6.3+6.4b-003+1) experimental; urgency=low + + [ Debian VIM Maintainers ] + * New upstream patch (003), see README.gz for details. + + -- Debian VIM Maintainers Fri, 14 Oct 2005 18:09:56 +0200 + +vim (1:6.3+6.4b-002+2) experimental; urgency=low + + [ Stefano Zacchiroli ] + * Updated patches for new release: + + 118_ocaml.vim.diff + + 124_errorformat.vim.diff + + 203_zh_TW.UTF8.po.diff + + -- Debian VIM Maintainers Thu, 13 Oct 2005 13:09:25 +0200 + +vim (1:6.3+6.4b-002+1) experimental; urgency=low + + [ Debian VIM Maintainers ] + * New upstream patch (002), see README.gz for details. + + -- Debian VIM Maintainers Wed, 12 Oct 2005 21:11:22 +0200 + +vim (1:6.3+6.4b-001+1) experimental; urgency=low + + [ Debian VIM Maintainers ] + * New major upstream beta release (6.4b). + * New upstream patch (001), see README.gz for details. + + [ Norbert Tretkowski ] + * Removed patches merged upstream: + + 110_php.vim.diff + + 112_prolog.vim.diff + + 113_xml.vim.diff + + 114_texinfo.vim.diff + + 116_sh.vim.diff + + 121_perl.vim.diff + + 126_filetype.vim.diff + + 128_vimdiff.1.diff + + 132_bib.vim.diff + + 139_perl.vim.diff + + 143_eruby.vim.diff + + 401_doc_exrc.diff + + 403_usr_04.txt.diff + + [ James Vega ] + * Updated patches for new release: + + 102_filetype.vim.diff + + 120_perl.vim.diff + + 142_filetype.vim.diff + + -- Debian VIM Maintainers Wed, 12 Oct 2005 09:41:28 +0200 + +vim (1:6.3-090+2) unstable; urgency=low + + * Stefano Zacchiroli : + + Fixed %ld typo in debian/patches/203_zh_TW.UTF8.po.diff + + Added patch debian/patches/403_usr_04.txt.diff, which fixes a + typo in usr_04.txt. (closes: #328664) + + -- Debian VIM Maintainers Sat, 8 Oct 2005 16:09:41 +0200 + +vim (1:6.3-090+1) unstable; urgency=low + + * New upstream patches (087 to 090), see README.gz for details. + + * Norbert Tretkowski : + + Updated Standards-Version to 3.6.2 (no changes needed). + + Exec vim with -f parameter in .desktop file. (closes: #329292) + + * Stefano Zacchiroli : + + Set SHELL=/bin/bash in debian/rules since we use bashisms. + (closes: #310974) + + Added patch 140_muttrc.vim.diff, which improves muttrc + highlighting. (closes: #327074) + + Added patch 141_asterisk.vim.diff, which adds support for Asterisk + configuration files sytnax highlighting. (closes: #322850) + + Added patch 142_filetype.vim.diff, which extends dch highlighting + to Debian NEWS files. (closes: #328081) + + Added patch 143_eruby.vim.diff, which adds support for eruby + highlighting. (closes: #315902) + + Added patch 144_scripts.vim.diff, which adds support for + highlighting tla diffs. (closes: #305677) + + Added patch 145_fortran.vim.diff, which fixes a matchit bug with + Fortran's "module procedure". (closes: #308865) + + Added patch 203_zh_TW.UTF8.po.diff, which fixes a translation + error in locale zh_TW.UTF-8. (closes: #319420) + + -- Debian VIM Maintainers Fri, 30 Sep 2005 17:08:36 +0200 + +vim (1:6.3-086+1) unstable; urgency=low + + * New upstream patch (086), see README.gz for details. + + * Norbert Tretkowski : + + Corrected wrong capitalization of menu entry. (closes: #320602) + + * Stefano Zacchiroli : + + Added patch 132_bib.vim.diff, which fixes highlighting of bibtex + comments. (closes: #316184) + + Added patch 133_filetype.vim.diff, which adds filetype recognition + for several Zope related file kinds. (closes: #311007) + + * Matthijs Mohlmann : + + Added patch 133_resolv.vim.diff, which fixes highlighting of resolv.conf + search entries. (closes: #321081) + + Added patch 134_sshconfig.vim.diff, added HashKnownHosts to syn keyword + sshconfigKeyword. (closes: #321119) + + Added debsources.vim to debian/updates to add syntax highlighting for + /etc/apt/sources.list and added this to filetype.vim. (closes: #308947) + + Added patch 136_muttrc.vim.diff, added crypt_autosign, crypt_autoencrypt + and xterm_set_titles to syn keyword. (closes: #323278) + + * Pierre Habouzit : + + Fix patch 105_xmodmap.vim.diff: wrt XF86_ClearGrab. (closes: #322355) + + Fix typo in doc/editing.txt. (closes: #322254) + + * James Vega : + + Added patch 137_filetype.vim.diff, recognize mutt-ng rc/temp files as + muttrc/mail filetypes. (closes: #307946) + + Added patch 138_filetype.txt.diff, fix a typo in the changelog-plugin + section of filetype.txt. (closes: #314595) + + Added patch 139_perl.vim.diff, fix recognition of regular expression + quantifiers. + + -- Debian VIM Maintainers Thu, 1 Sep 2005 18:40:41 +0200 + +vim (1:6.3-085+1) unstable; urgency=high + + * New upstream patches (079 to 085), see README.gz for details. + + 6.3.081, 6.3.082: Fix arbitrary shell commands execution by wrapping + them in glob() or expand() function calls in modelines. (CAN-2005-2368) + (closes: #320017) + + * James Vega : + + Added patch 129_filetype.vim.diff, which sets the filetype to perl for + *.plx files. (closes: #314309) + + * Matthijs Mohlmann : + + Added patch 130_fstab.vim.diff, added bind as option. (closes: #308890) + + Added patch 131_xxd.1.diff, fixes typo in xxd manpage. (closes: #311234) + + -- Debian VIM Maintainers Thu, 28 Jul 2005 12:16:06 +0200 + +vim (1:6.3-078+1ubuntu3) breezy; urgency=low + + * Rebuild for the cairo1 -> cairo2 transition. + + -- Adam Conrad Tue, 23 Aug 2005 01:57:09 +1000 + +vim (1:6.3-078+1ubuntu2) breezy; urgency=low + + * SECURITY UPDATE: Fix code execution. + * Add debian/patches/990_modeline_codeexec.diff: + - Do not execute code in glob() and expand() statements when we read them + from a modeline. + - Combined upstream patches 6.3.081 and 6.3.082. + - References: + http://www.guninski.com/where_do_you_want_billg_to_go_today_5.html + * debian/patches/124_errorformat.vim.diff: Remove obsolete hunk that doesn't + apply any more. + + -- Martin Pitt Tue, 26 Jul 2005 11:30:46 +0000 + +vim (1:6.3-078+1ubuntu1) breezy; urgency=low + + * Resynchronise with Debian. + + -- Michael Vogt Thu, 23 Jun 2005 15:32:31 +0200 + +vim (1:6.3-078+1) unstable; urgency=low + + * New upstream patches (073 to 078), see README.gz for details. + + * James Vega : + + Added patch 128_vimdiff.1.diff, which fixes a typo in the vimdiff + manpage. (closes: #310331) + + -- Debian VIM Maintainers Tue, 14 Jun 2005 21:25:00 +0200 + +vim (1:6.3-072+1) unstable; urgency=high + + * New upstream patch (072), see README.gz for details. + + * James Vega : + + Updated patch 125_gzip.vim.diff to match upstream's vim7 patch. + Removed compression detection for FileAppendPre since there's no good + way to retrieve the necessary information. + + Added patch 127_scripts.vim.diff, makes Vim automatically set the proper + filetype when editing lua scripts. The patch also enables recognition + of "#!/usr/bin/env xxx" hashbang lines. (closes: #309859) + + -- Debian VIM Maintainers Fri, 20 May 2005 20:41:35 +0200 + +vim (1:6.3-071+2) unstable; urgency=low + + * Stefano Zacchiroli : + + Modifications on debian/rules: + - Do not invoke dh_installdirs before creating .dirs file for current + variant (fixes non-installation of gvim.desktop in all variants). + - Optional cmdline parameter PATCH_NAME for make_patch target. + - Invoke dh_desktop to register gvim.desktop on postinst. + + Modifications on debian/vim-variant.desktop: + - Internationalized comment (inspired from gedit's one). + - Added MimeType entry. + - Uses svg icon. + + Added svg icon /usr/share/icons/vim.svg, thanks to + Paul Ortman . (closes: #258669) + + Updated patch 118_ocaml.vim.diff (new upstream). + + Added patch 124_errorformat.vim.diff, makes vim follow error directories + on "make -C". (closes: #276005) + + Added patch 126_filetype.vim.diff, set tex filetype on .cls TeX classes, + distinguishing them from smalltalk sources. (closes: #169716) + + * Norbert Tretkowski : + + Build-Depend on debhelper (>= 4.2.21), required for dh_desktop call. + + Reverted value of backupcopy to default. + + * Matthijs Mohlmann : + + Added patch for german accents. (closes: #307807) + + * James Vega : + + Added patch 125_gzip.vim.diff, maintain "max speed" and "max compression" + compression levels when editing gzip files. (closes: #280388) + + -- Debian VIM Maintainers Sun, 15 May 2005 19:12:57 +0200 + +vim (1:6.3-071+1sarge1) stable; urgency=high + + * New upstream patches (081 and 082), see README.gz for details. + + 6.3.081, 6.3.082: Fix arbitrary shell commands execution by wrapping + them in glob() or expand() function calls in modelines. (CAN-2005-2368) + (closes: #320017) + + -- Norbert Tretkowski Sat, 30 Jul 2005 12:16:45 +0200 + +vim (1:6.3-071+1) unstable; urgency=medium + + * New upstream patches (069 to 071), see README.gz for details. + + * Norbert Tretkowski : + + Re-add dh_installdirs to vim-variant part in debian/rules, so copying + the desktop file no longer fails. (closes: #302830) + + Enabled backupcopy in global vimrc. (closes: #158657) + + * Stefano Zacchiroli : + + Added vim-full variant with support for gnome and all interpreters. + (closes: #149077) + + Added /usr/share/common-licenses/ reference to debian/copyright. + + Remove debian/helpztags.1 on debian/rules clean (generated file). + + Updated patch 118_ocaml.vim.diff (new upstream). + + Added patch 122_html_indent.vim.diff, remove from indentkeys for + html. (closes: #280386) + + Added patch 401_doc_exrc.diff, fixes starting doc about "_exrc". + (closes: #279378) + + Suggests vim-scripts in debian/control. + + * Matthijs Mohlmann : + + Fixes menu entry with icon (wrong syntax used in menu file), thanks to + Alexis Sukrieh . + + * James Vega : + + Added patch 120_perl.vim.diff, update $VIMRUNTIME/syntax/perl.vim from + the author which fixes block indentation in packages. (closes: #220969) + + Added patch 121_perl.vim.diff, which adds syntax recognition for + CHECK/INIT blocks (similar to BEGIN/END). + + -- Norbert Tretkowski Sun, 24 Apr 2005 17:26:49 +0200 + +vim (1:6.3-68+4ubuntu3) breezy; urgency=low + + * debian/control: + - Build-Depends on libxt-dev (Ubuntu: #11113). + + -- Sebastien Bacher Fri, 27 May 2005 19:46:38 +0200 + +vim (1:6.3-68+4ubuntu2) breezy; urgency=low + + * Drop vim-lesstif package. + + -- Daniel Stone Mon, 23 May 2005 22:19:45 +1000 + +vim (1:6.3-68+4ubuntu1) breezy; urgency=low + + * Add 'breezy' to the list of accepted distribution keywords. + + -- Daniel Stone Wed, 13 Apr 2005 12:44:25 +1000 + +vim (1:6.3-068+4) unstable; urgency=medium + + * Norbert Tretkowski : + + Removed all kvim related packages, the code is no longer maintained. + Sorry. (closes: #234455, #237385, #283765, #293110, #194449, #205586, + #266431, #272621, #294848, #245006, #194964) + + Removed patch 401_gcc4.diff, it modified kvim code which is no longer + available. + + Added NEWS file, so people upgrading to this version getting informed + about the kvim removal. + + * Matthijs Mohlmann : + + Fixed up a patch for xml.vim. + + -- Norbert Tretkowski Sat, 2 Apr 2005 18:31:19 +0200 + +vim (1:6.3-068+3) unstable; urgency=medium + + * Norbert Tretkowski : + + Add a replaces: vim (<= 1:6.3-068+1) to every (k)vim-* package, required + for menu-icon-missing fix from 1:6.3-068+2. (closes: #301866) + + Urgency medium because above modification fixes regular upgrade with + apt-get. + + Fixed broken rgvim manpage. (closes: #301881) + + -- Norbert Tretkowski Tue, 29 Mar 2005 01:00:23 +0200 + +vim (1:6.3-068+2) unstable; urgency=low + + * Pierre Habouzit : + + Enhance the es.po. (closes: #206782) + + * Matthijs Mohlmann : + + Modified patch 113_xml.vim.diff that fixes #196001 has introduced + another syntax error. (closes: #301736) + + Fixed menu-icon-missing on vim-* packages. + + -- Norbert Tretkowski Mon, 28 Mar 2005 19:26:35 +0200 + +vim (1:6.3-068+1) unstable; urgency=low + + * New upstream patch (068), see README.gz for details. + + 6.3.068: When editing a compressed file xxx.gz which is a symbolic link + to the actual file a ":write" no longer renames the link (patch by James + Vega). (closes: #281630) + + * Norbert Tretkowski : + + Added James Vega to uploaders. + + Fixed wrong executable registration in /usr/lib/mime/packages/kvim, + thanks to Robin Verduijn for the patch. (closes: #295471) + + Fixed synchronisation of syntax highlighting in fortran 90 programs. + (closes: #301452) + + Removed vim-doc's dependency on vim, so it's possible to install vim-doc + without also installing vim. + + * Pierre Habouzit : + + Fix php indent plugin, thanks to the ITLab at MUSC. (closes: #282135) + + Fix prolog syntax file. (closes: #269692) + + Fix xml syntax ('\' has no special meaning for xml). (closes: #196001) + + Fix texinfo syntax file warning. (closes: #286763) + + * Matthijs Mohlmann : + + Fix lintian warning packages-installs-file-to-usr-x11r6: + - Moving xpm files to /usr/share/pixmaps. + - Edited the menu files. + + Removed prerm-does-not-call-installdocs from lintian/vim. + + Added patch 111_fstab.vim.diff to fix highlighting in fstab. + (closes: #300108) + + Removed Suggests: vim from vim-doc in debian/control. + + Fixed binary-without-manpage for several packages. + + Fixed pkg-not-in-package-test in kvim-tcl, kvim-ruby, kvim-python and + kvim-perl. + + Fixed the errors postinst-does-not-call-updatemenus and + postrm-does-not-call-updatemenus. + + * James Vega : + + Fixed wrong highlighting of comments in syntax/sh.vim when comments + occur between switches of case. (closes: #269325) + + * Stefano Zacchiroli : + + Added patch 302_message.c.diff to fix CTRL-C quit loops in range commands. + (closes: #295639) + + Added patch 118_ocaml.vim.diff to ship latest version of ocaml runtime + support files: {syntax,ftplugin,ident}/ocaml.vim. + + Modifications on debian/rules: + - Uses debian/compat in place of debian/rules' DH_COMPAT. + - Ignores diff error in "make_patch" target since diff usually returns 1. + - Added support for command line VARIANT variable to override VARIANTS. + + * Pepijn de Langen : + + Added patch 119_php.vim.diff to php syntax highlighting backticks. + (closes: #144754) + + -- Norbert Tretkowski Sat, 26 Mar 2005 16:32:25 +0100 + +vim (1:6.3-067+2) unstable; urgency=medium + + * Norbert Tretkowski : + + Disabled dh_installchangelogs and dh_installdocs for vim-doc. + + Raised urgency to medium because of upstream patch 6.3.066. + + -- Norbert Tretkowski Sun, 20 Mar 2005 22:05:36 +0100 + +vim (1:6.3-067+1) unstable; urgency=low + + * New upstream patches (065 to 067), see README.gz for details. + + 6.3.065: Entering Euro char via digraph doesn't always work. + (closes: #298162) + + * Norbert Tretkowski : + + Added Pierre Habouzit, Torsten Landschoff, Matthijs Mohlmann, Stefano + Zacchiroli, Alexis Sukrieh and Pepijn de Langen to uploaders. + (closes: #299446) + + Added a new patch from Christian Hammers which adds additional keywords + to /etc/fstab syntax hilighting. (closes: #299704) + + Modified --with-compiledby value to use $DEBFULLNAME and $DEBEMAIL. + + Updated tpp syntax file, thanks to Gerfried Fuchs. + + Changed priority of vim-common package from extra to optional. + + * Pierre Habouzit : + + Documented the /etc/vim/{g,}vimrc.local files in README.Debian. + + Fixed some debcontrol.vim issues: + - Don't search emails in fields that have not one. (closes: #114508) + - Fix debcontrolName according to Policy. (closes: #148144) + + Fixed tutor.vim to use usual locale envvars semantics. (closes: #289113) + + Added a 16px icon for menu entries too + (taken from http://www.vim.org/images/vim16x16.xpm). (closes: #39250) + + Fixed changelog.Debian.gz detection. (closes: #263740) + + Manpages various fixes: + - Escape some dashes in vim(1). (closes: #279606) + - Various fixes for xxd(1). (closes: #281124) + + Fixed french translation. (closes: #277502) + + * Matthijs Mohlmann : + + Add syntax highlighting for xmodmap. (closes: #296759) + + Fixed lintian warning unquoted-string-in-menu-item in kvim.menu. + + Fixed lintian warning spelling-error-in-readme-debian (adviced should + be advised). + + Changed current maintainer in copyright file. + + Fixed lintian warning package-relation-with-self in kvim. + + Fixed lintian warning binary-has-unneeded-section in vim (added + dh_strip). + + Added depends on vim in vim-doc. + + * Alexis Sukrieh : + + Added a note about UTF-8 related issues in README.Debian. + + Added debian/patches/108_automake.vim.diff (thanks to Alexander Kogan) + which enables highlighting of _CPPFLAGS in automake files. + (closes: #196212) + + Added debian/patches/109_xdefaults.vim.diff (thanks to Peter De Wachter) + which fixes bad highlighting when putting a FONT directive in xdefaults. + (closes: #264284) + + * Stefano Zacchiroli : + + Added #DEBHELPER# tag to debian/vim-{doc,common}.preinst. + + Minor cleanup of debian/rules so vim-{doc,common} uses dh_install + instead of dh_movefiles ("binary" target could now be invoked twice + after a single "install" invocation), let dh_compress compress README. + + -- Norbert Tretkowski Sun, 20 Mar 2005 10:56:11 +0100 + +vim (1:6.3-064+1) unstable; urgency=low + + * Norbert Tretkowski : + + New upstream patches (062 to 064), see README.gz for details. + + Set maintainer address to project mailinglist on alioth and added myself to + uploaders. + + Added a new patch which sets automake syntax recognition for files named + GNUmakefile.am. (closes: #277596) + + Added a new patch which adds testing-proposed-updates to debchangelog + syntax hilighting. + + -- Norbert Tretkowski Mon, 14 Mar 2005 14:58:49 +0100 + +vim (1:6.3-061+1) unstable; urgency=high + + * New upstream patches (059 to 061), see README.gz for details. + * Kudos to Javier Fernandez-Sanguino Pena, he discovered the usage of + insecure $$ constructs in vimspell.sh and tcltags.sh which have been + fixed with the last upload. + * Removed vimspell.sh and tcltags.sh, these scripts are no longer supported + upstream. + * Removed patch which was added in 1:6.3-058+1, it's no longer required. + + -- Norbert Tretkowski Tue, 01 Feb 2005 22:39:26 +0100 + +vim (1:6.3-058+1) unstable; urgency=high + + * New upstream patches (055 to 058), see README.gz for details. + * Added a new patch (stolen from Ubuntu) which modifies vimspell.sh and + tcltags.sh so they use mktemp instead of insecure $$ construction to + create temporary files. (CAN-2005-0069) (closes: #289560) + + -- Norbert Tretkowski Tue, 18 Jan 2005 20:12:25 +0100 + +vim (1:6.3-054+1) unstable; urgency=low + + * New upstream patches (047 to 054), see README.gz for details. + * Source /etc/vim/gvimrc.local if available. (closes: #272001) + * Added a new patch which fixes ftbfs on amd64 with gcc-4.0, thanks to + Andreas Jochens. (closes: #288731) + + -- Norbert Tretkowski Wed, 05 Jan 2005 20:51:36 +0100 + +vim (1:6.3-046+1ubuntu7) hoary; urgency=low + + * Ensure kubuntu_01_xdg_menus.diff is not applied before uploading. + + -- Jonathan Riddell Sun, 3 Apr 2005 13:09:32 +0100 + +vim (1:6.3-046+1ubuntu6) hoary; urgency=low + + * Add kubuntu_01_xdg_menus.diff to make kvim menu entry XDG compliant. + + -- Jonathan Riddell Sun, 3 Apr 2005 00:44:21 +0000 + +vim (1:6.3-046+1ubuntu5) hoary; urgency=low + + * Revert KDE removal, thus making the kvim package actually have useful + content rather than just a broken diversion of vim. kvim-ruby is still + skipped. + + -- Colin Watson Tue, 8 Mar 2005 00:09:16 +0000 + +vim (1:6.3-046+1ubuntu4) hoary; urgency=low + + * Drop editor alternative priority to 35, since Ubuntu installs vim by + default (closes: Ubuntu #4710). + + -- Colin Watson Tue, 1 Mar 2005 15:37:33 +0000 + +vim (1:6.3-046+1ubuntu3) hoary; urgency=low + + * Don't autoindent by default (Ubuntu: #5602) + + -- Thom May Wed, 19 Jan 2005 12:10:29 +0000 + +vim (1:6.3-046+1ubuntu2) hoary; urgency=low + + * SECURITY UPDATE: fix insecure temporary files + * Added patch 104_secure_tempfiles.diff: use mktemp instead of insecure $$ + construction to create temporary files in vimspell.sh and tcltags.sh + * References: + CAN-2005-0069 + http://bugs.debian.org/289560 + + -- Martin Pitt Tue, 18 Jan 2005 16:29:10 +0100 + +vim (1:6.3-046+1ubuntu1) hoary; urgency=low + + * Resynchronise with Debian. + * debian/vim-variant.desktop: Disable menu item again. + + -- Colin Watson Sun, 19 Dec 2004 11:42:55 +0000 + +vim (1:6.3-046+0sarge1) testing-proposed-updates; urgency=high + + * Built on testing for testing-proposed-updates because patch 045 fixes + several vulnerabilities found by Ciaran McCreesh related to the use of + options in modelines. (CAN-2004-1138) + + -- Norbert Tretkowski Sun, 19 Dec 2004 20:06:53 +0100 + +vim (1:6.3-046+1) unstable; urgency=low + + * New upstream patches (032 to 046), see README.gz for details. + * Added a desktop entry under /usr/share/applications/ for all variants. + (closes: #285065) + * Added farsi fonts to vim-common package. (closes: #258773) + + -- Norbert Tretkowski Sun, 12 Dec 2004 02:36:11 +0100 + +vim (1:6.3-031+3ubuntu4) hoary; urgency=low + + * Rebuild with python2.4. + + -- Matthias Klose Thu, 16 Dec 2004 11:57:12 +0100 + +vim (1:6.3-031+3ubuntu3) hoary; urgency=low + + * 900_debcontrol.vim.diff: Add restricted, universe, and multiverse to + debcontrolSection. + * debian/rules (make_patch): Ignore error code from diff, since it'll + normally be non-zero. + + -- Colin Watson Fri, 10 Dec 2004 12:47:00 +0100 + +vim (1:6.3-031+3ubuntu2) hoary; urgency=low + + * 900_debcontrol.vim.diff: Add amd64 to debcontrolArchitecture. + * 901_debchangelog.vim.diff: Add warty and hoary to debchangelogTarget. + * Fix changelog ordering. + + -- Colin Watson Mon, 6 Dec 2004 18:23:01 +0100 + +vim (1:6.3-031+3ubuntu1) hoary; urgency=low + + * Resynchronise with Debian. + + -- Scott James Remnant Wed, 17 Nov 2004 00:17:02 +0000 + +vim (1:6.3-031+3) unstable; urgency=low + + * Really add Brandens patch which adds XXX and FIXME comment hilighting + to sh.vim. (closes: #280471) + * Updated debcontrol.vim syntax file, which adds debcontrolArchitecture + for s390, thanks to Gerfried Fuchs. (closes: #281127) + + -- Norbert Tretkowski Sun, 14 Nov 2004 01:14:35 +0100 + +vim (1:6.3-031+2) unstable; urgency=low + + * Fixed broken vim-doc.preinst. (closes: #280824, #280825) + + -- Norbert Tretkowski Thu, 11 Nov 2004 23:56:12 +0100 + +vim (1:6.3-031+1) unstable; urgency=low + + * New upstream patches (026 to 031), see README.gz for details. + * Add symlink replacing from vim-common also to vim-doc. (closes: #279058) + * Added a new patch which adds XXX and FIXME comment hilighting to sh.vim, + thanks to Branden Robinson. (closes: #280471) + * Added a new patch which allows multiple spaces as arguments for xxd, + thanks to Glyn Kennington. (closes: #279709) + * Updated tpp and debcontrol syntax files, thanks to Gerfried Fuchs. + + -- Norbert Tretkowski Tue, 09 Nov 2004 18:56:42 +0100 + +vim (1:6.3-025+1ubuntu2) warty; urgency=low + + * debian/vim-gnome.desktop: + - Disable menu item. + + -- Jeff Waugh Fri, 8 Oct 2004 10:04:36 +1000 + +vim (1:6.3-025+1ubuntu1) warty; urgency=low + + * New version from sid (Closes: Warty#1687) + - Fixes diversions (Closes: Warty#834) + * Merge changes from 1:6.2-532+4ubuntu1 + - Don't build kvim* + - Remove build-dependency on kdelibs + - Don't build vim-ruby + - Remove build-dependencies on ruby, ruby-dev + * Build vim-basic with python support + * Don't build with GNOME support, since that would bloat base + * Add conflicts: vim (= 1:6.2-532+4ubuntu2) to vim variants + due to moving of gvimrc + (Closes: Warty#1717 + + -- Matt Zimmerman Fri, 24 Sep 2004 13:46:42 -0700 + +vim (1:6.3-025+1) unstable; urgency=low + + * New upstream patches (020 to 025), see README.gz for details. + + -- Norbert Tretkowski Sun, 05 Sep 2004 21:13:04 +0200 + +vim (1:6.3-019+1) unstable; urgency=medium + + * New upstream patches (016 to 019), see README.gz for details. + * Added a new patch which adds some more sections to debcontrol.vim, + thanks to Branden Robinson. (closes: #258547) + * Removed setting the guifont in gvimrc. (closes: #267399, #268253) + * Compress README file. (closes: #267532) + + -- Norbert Tretkowski Mon, 30 Aug 2004 21:06:01 +0200 + +vim (1:6.3-015+1) unstable; urgency=medium + + * New upstream patches (014 and 015), see README.gz for details. + * Removed Luca from Uploaders, thanks for your work! (closes: #266476) + * Added a workaround for setting papersize when running vim in restricted + mode, thanks to Alexey Marinichev. (closes: #260452, #265227) + * Added a new patch which fixes broken else syntax hilighting in make.vim, + thanks to Steinar H. Gunderson. (closes: #260473, #259819) + * Fixed spelling error in vim-common description. (closes: #264279) + * Added a patch from 1:6.2-532+1 which got lost with the update to 6.3 + and fixes svn commit file highlighting. + * Added a new patch which adds s390 and amd64 to debcontrol.vim. + + -- Norbert Tretkowski Wed, 17 Aug 2004 19:34:13 +0200 + +vim (1:6.3-013+2) unstable; urgency=low + + * Empty vim-common directory before rmdir it. (closes: #258809) + * Add symlink replacing from vim-common also to vim-variant. + + -- Norbert Tretkowski Sun, 11 Jul 2004 18:11:45 +0200 + +vim (1:6.3-013+1) unstable; urgency=low + + * New upstream patches (012 and 013), see README.gz for details. + * More modifications on /usr/share/doc/vim-common symlink detection. + (closes: #257810) + * Source /etc/vim/vimrc.local if available. (closes: #257779) + * Added a virtual package gvim. + + -- Norbert Tretkowski Fri, 09 Jul 2004 22:56:33 +0200 + +vim (1:6.3-011+2) unstable; urgency=low + + * Modify detection of /usr/share/doc/vim-common symlink. (closes: #257623) + + -- Norbert Tretkowski Sun, 04 Jul 2004 19:35:16 +0200 + +vim (1:6.3-011+1) unstable; urgency=low + + * New upstream patch (011), see README.gz for details + * Disabled libgpm-dev build-dependency for kfreebsd-i386 (closes: #257230) + * Fixed vim-common's dependency on vim (closes: #257359, #257428, #257547) + * No longer compress version6.txt in documentation. (closes: #257338, #257445) + * Force replacing empty directories in /usr/share/doc with a symlink. + (closes: #257449) + + -- Norbert Tretkowski Sun, 04 Jul 2004 11:21:36 +0200 + +vim (1:6.3-010+1) unstable; urgency=low + + * Norbert Tretkowski : + + new upstream patches (005 to 010), see README.gz for details + + temporary disabled vim-tiny package, will be re-added with the next + upload + + * Mickael Marchand : + + updated kvim patch to apply without conflicts to new vim upstream + patches + + -- Norbert Tretkowski Thu, 30 Jun 2004 18:35:26 +0200 + +vim (1:6.3-004+1) unstable; urgency=low + + * Norbert Tretkowski : + + new major upstream release (6.3) + + new upstream patches (001 to 004), see README.gz for details + + merged changes from 1:6.2-532+6 + + fixed broken changelog symlink (closes: #253319) + + -- Norbert Tretkowski Fri, 11 Jun 2004 21:31:25 +0200 + +vim (1:6.2+6.3b-016+1) experimental; urgency=low + + * Norbert Tretkowski : + + new upstream patches (008 to 016), see README.gz for details + + made vim depend on vim-common in the same upstream version, so upgrading + to experimental vim will also install new vim-common (closes: #251736) + + merged changes from 1:6.2-532+5 + + -- Norbert Tretkowski Sun, 30 May 2004 16:45:02 -0300 + +vim (1:6.2+6.3b-007+1) experimental; urgency=low + + * Norbert Tretkowski : + + new upstream patches (002 to 007), see README.gz for details + + applied patch from Thomas de Grenier de Latour which fixes problems with + non-builtin icons and gtk+ 2.4 + + -- Norbert Tretkowski Wed, 26 May 2004 19:09:21 -0300 + +vim (1:6.2+6.3b-001+1) experimental; urgency=low + + * Norbert Tretkowski : + + new major upstream beta release (6.3b) + + new upstream patch (001), see README.gz for details + + modified runtime path in global vimrc + + merged changes from 1:6.2-532+3 and 1:6.2-532+4 + + -- Norbert Tretkowski Wed, 19 May 2004 19:19:26 +0200 + +vim (1:6.2+6.3a-018+1) experimental; urgency=low + + * Norbert Tretkowski : + + new upstream patches (007 to 018), see README.gz for details + + merged changes from 1:6.2-532+2 + + -- Norbert Tretkowski Wed, 12 May 2004 22:05:31 +0200 + +vim (1:6.2+6.3a-006+1) experimental; urgency=low + + * Norbert Tretkowski : + + new major upstream beta release (6.3a) + - removed second -X option from vim(1) (closes: #231504) + - added evim to executables in vim(1) (closes: #223866) + - fixed typo in man.vim plugin (closes: #256951) + + new upstream patches (001 to 006), see README.gz for details + + removed most debian specific patches, because they got merged upstream + now + + modified runtime path in global vimrc + + modified directories in vim.links and vim.install + + * Mickael Marchand : + + updated kvim patch to apply without conflicts to new vim upstream + beta release + + -- Norbert Tretkowski Sat, 08 May 2004 23:29:31 +0200 + +vim (1:6.2-532+6) unstable; urgency=low + + * Norbert Tretkowski : + + applied a patch from Eduard Bloch which makes gvim load the UTF-8 + version of fixed font when the $LANG or $LC_CTYPE environment variables + are set for the Unicode environment (closes: #177599) + + added a patch which enhances detection of html files (closes: #211263) + + removed c part from maze macro, looks like it doesn't work any longer + (closes: #121837) + + updated perl syntax file (closes: #232660) + + suggest 'ssh' instead of 'rsh' in tagsrch.txt (closes: #229634) + + capitalized 'unicode' string in description (closes: #172065) + + fixed broken removal of vim-gnome diversion (closes: #252248) + + fixed small typo in kvim mime files (closes: #250585) + + fixed small mistake in global vimrc (closes: #165964) + + added /usr/share/bug/vim/presubj file with some informations for + submitters of bugs + + -- Norbert Tretkowski Sat, 05 Jun 2004 16:42:42 +0200 + +vim (1:6.2-532+5) unstable; urgency=low + + * Norbert Tretkowski : + + re-added a vim-tiny package, looks like it got lost somewhere between + potato and woody (closes: #222138) + + added a patch which adds 'UsePAM' directive to sshdconfig.vim syntax file + (closes: #250064) + + added a patch from Doug Winter which add recognition of 'as' keyword in + python syntax file (closes: #247326) + + added a patch from Dirk Proesdorf which corrects new 'alternates' keyword + behaviour in mutt syntax file (closes: #247098) + + added a patch which adds syntax highlighting for whitespace files + (closes: #226352) + + added a patch from Brian M. Carlson which adds highlighting for 'lldiv_t' + in c syntax file (closes: #202316) + + added a patch which fixes a typo in map.txt (closes: #198667) + + modified gvim and kvim menu entry, so they are started with -f now + (closes: #153112) + + added -f to mailcap view rules (closes: #101377) + + -- Norbert Tretkowski Sat, 29 May 2004 22:43:11 -0300 + +vim (1:6.2-532+4) unstable; urgency=low + + * Norbert Tretkowski : + + used --with-features=big also for vim-basic variant (closes: #228485) + + binaries now including debugging information (closes: #249602) + + added support for "nostrip" in $DEB_BUILD_OPTIONS + + removed patch from Uli Martens introduced in 1:6.2-214+1 which modifies + runtime path in macros/less.sh, it's no longer needed since 1:6.2-532+3 + + modified link to upstream changelog, it's no longer gzipped since + 1:6.2-532+1 + + added version (>= 2.2) to libgtk2.0-dev build-dependency + + added priority to kvim package in control file + + -- Norbert Tretkowski Wed, 19 May 2004 16:30:25 +0200 + +vim (1:6.2-532+3) unstable; urgency=low + + * Norbert Tretkowski : + + added a patch from Peter Jay Salzman which fixes a typo in + hebrewp_utf-8.vim (closes: #197932) + + added a syntax file from Luca De Vitis which adds support for debconf + templates (closes: #168731) + + moved macros and tools back into runtime directory (closes: #190181) + + moved runtimepath above inclusion of filetype.vim in /etc/vim/vimrc + (closes: #248402) + + really added a patch from Jeff Layton with a syntax correction for + quoted here-documents (closes: #248562) + + less.sh is now executable (closes: #244599) + + modified new versioned dependencies from 1:6.2-532+2 so the dependency + is only on upstream release (closes: #248949) + + corrected version number in kvim conflicts/replaces, the epoche was + missing + + made /usr/share/doc/vim-common a symlink to /usr/share/doc/vim + + modified some overrides to shut up installer at ftp-master + + -- Norbert Tretkowski Sat, 15 May 2004 16:22:56 +0200 + +vim (1:6.2-532+2) unstable; urgency=low + + * Norbert Tretkowski : + + changes in debian/control from Michaels patch for hurd-i386 build got + lost (really closes: #244769) + + reenabled python package build for hurd-i386 build + + added versioned dependency on vim to vim-common and vice versa + (closes: #248423, #248563) + + build-conflict with libperl-dev (= 5.8.4-1) because it's broken + (see #247291 for details) + + added a patch from Jeff Layton with a syntax correction for quoted + here-documents (closes: #248562) + + updated netrw plugin (closes: #248623) + + updated squid syntax file (closes: #247810) + + added menu hints (closes: #82322) + + added background for syntax highlighting in vimrc (closes: #99762) + + disabled regenerating of tags file (closes: #244852) + + case-insensitive field names in debcontrol.vim (closes: #102232) + + added some notes about reporting bugs against this package to + README.Debian + + removed note about modelines from README.Debian + + -- Norbert Tretkowski Wed, 12 May 2004 20:42:56 +0200 + +vim (1:6.2-532+1) unstable; urgency=low + + * Norbert Tretkowski : + + new upstream patches (427 to 532), see README.gz for details + + no longer compress helpfiles, it breaks :helpg (closes: #244114) + + added a patch which fixes svn commit file highlighting + (closes: #239320, #242286) + + added a patch from Jan Minar which fixes a documentation error in + cmdline.txt (closes: #241907) + + added a patch from Roland Stigge which adds "Enhances" keyword to + debcontrol syntax highlighting (closes: #235524) + + added a patch from Domenico Andreoli which adds "reiserfs4" keyword to + fstab syntax highlighting (closes: #236571) + + applied a patch from Michael Bank which adds some exceptions for + hurd-i386 build (closes: #244769) + + added alternative for gnome-text-editor to vim-gnome (closes: #243443) + + added alternative for gvim.1.gz to vim.1.gz (closes: #231503, #238181) + + added vim-policy.txt to vim package (closes: #246174) + + cleaned up debian/rules file and files in debian/patches a bit + + * Mickael Marchand : + + updated kvim patch to apply without conflicts to new vim upstream + patches + + -- Norbert Tretkowski Sat, 08 May 2004 22:42:16 +0200 + +vim (1:6.2-426+1) unstable; urgency=low + + * Norbert Tretkowski : + + new upstream patches (365 to 426), see README.gz for details + + updated 01ruby_mkmf.diff to apply without conflicts to new vim upstream + patches + + * Mickael Marchand : + + updated kvim patch to apply without conflicts to new vim upstream + patches + + -- Norbert Tretkowski Thu, 01 Apr 2004 17:14:13 +0200 + +vim (1:6.2-364+1) unstable; urgency=low + + * Norbert Tretkowski : + + new upstream patches (354 to 364), see README.gz for details + + reenabled modelines in default vimrc (closes: #205501) + + -- Norbert Tretkowski Tue, 16 Mar 2004 19:09:35 +0100 + +vim (1:6.2-353+1) unstable; urgency=low + + * Norbert Tretkowski : + + new upstream patches (317 to 353), see README.gz for details + (closes: #188640) + + removed second /etc/vim from global runtime patch (closes: #237197) + + added vimrc_example.vim to $VIMRUNTIME (closes: #127141) + + -- Norbert Tretkowski Sat, 13 Mar 2004 16:25:06 +0100 + +vim (1:6.2-316+1) unstable; urgency=low + + * Norbert Tretkowski : + + new upstream patches (295 to 316), see README.gz for details + + -- Norbert Tretkowski Thu, 04 Mar 2004 22:27:35 +0100 + +vim (1:6.2-294+1) unstable; urgency=low + + * Norbert Tretkowski : + + new upstream patches (271 to 294), see README.gz for details + + moved arch independant data in a separate vim-common package + (closes: #233454) + + added a patch to recognize new keywords for java 1.5 in java syntax + file, thanks to Seneca Cunningham (closes: #231916) + + added a provides: kvim to kvim-packages (closes: #234690) + + * Mickael Marchand : + + updated kvim patch to apply without conflicts to new vim upstream + patches + + -- Norbert Tretkowski Sun, 29 Feb 2004 14:48:45 +0100 + +vim (1:6.2-270+1) unstable; urgency=low + + * Norbert Tretkowski : + + new upstream patches (215 to 270), see README.gz for details + + updated 01ruby_mkmf.diff and 11allow-threaded-perl.diff to apply without + conflicts to new vim upstream patches + + * Mickael Marchand : + + updated kvim patch to apply without conflicts to new vim upstream + patches + + -- Norbert Tretkowski Wed, 18 Feb 2004 00:22:01 +0100 + +vim (1:6.2-214+2) unstable; urgency=low + + * Mickael Marchand : + + add support for kvim-python, kvim-perl, kvim-tcl and kvim-ruby + (closes: #228865) + + add /etc/vim/gvimrc to kvim* packages + + -- Mickael Marchand Fri, 30 Jan 2004 00:52:11 +0100 + +vim (1:6.2-214+1) unstable; urgency=low + + * Norbert Tretkowski : + + new Co-Maintainer Mickael Marchand + + new upstream patches (182 to 214), see README.gz for details + + added a patch which adds sysfs to fstab keywords, thanks to Iain + Broadfoot (closes: #228475) + + added a patch which modifies runtime path in macros/less.sh, thanks + to Uli Martens (closes: #228779) + + * Mickael Marchand : + + updated kvim patch to apply without conflicts to new vim upstream + patches + + -- Norbert Tretkowski Wed, 28 Jan 2004 20:18:52 +0100 + +vim (1:6.2-181+1) unstable; urgency=low + + * new upstream patches (174 to 181), see README.gz for details + * added gvim to GNOME application menu, thanks to Lee Maguire + (closes: #226848) + + -- Norbert Tretkowski Fri, 16 Jan 2004 01:48:32 +0100 + +vim (1:6.2-173+1) unstable; urgency=low + + * new upstream patches (171 to 173), see README.gz for details + * added some more replaces to vim and kvim to avoid problems when upgrading + from older kvim (closes: #226735) + * added a patch which adds usbdevfs to fstab keywords, thanks to Ludovit + Hamaj (closes: #226714) + + -- Norbert Tretkowski Thu, 08 Jan 2004 19:19:01 +0100 + +vim (1:6.2-170+1) unstable; urgency=low + + * new upstream patches (155 to 170), see README.gz for details + * updated kvim patch to apply without conflicts to new vim upstream patches, + thanks to Mickael Marchand + * updated 01ruby_mkmf.diff and 11allow-threaded-perl.diff to apply without + conflicts to new vim upstream patches + * new Maintainer: Norbert Tretkowski + * new Co-Maintainer: Luca Filipozzi + * added FAQ.gz to vim package (closes: #221909) + * added additional php keywords to syntax file, thanks to Tobias Olsson and + Jill Vogel (closes: #148757, #176448) + * added german umlauts to keymap file, thanks to Marco Herrn + (closes: #217633) + * added filetypes for php4 + + -- Norbert Tretkowski Tue, 30 Dec 2003 14:48:31 +0100 + +vim (1:6.2-154+1) unstable; urgency=low + + * new upstream patches (150 to 154), see README.gz for details + * added new variant for a lesstif package, thanks to Bernd Westphal + * added a patch to recognize reply-hook keyword in the muttrc syntax file, + thanks to Marco Herrn (closes: #221350) + + -- Norbert Tretkowski Wed, 10 Dec 2003 00:18:35 +0100 + +vim (1:6.2-149+1) unstable; urgency=low + + * new upstream patches (146 to 149), see README.gz for details + * added a patch to fix wrong highlighting in makefiles, thanks to Cyrille + Dunant (closes: #133323) + * added another patch to add '.' to debcontrolName highlighting, thanks to + David Weinehall (closes: #117038) + + -- Norbert Tretkowski Sun, 9 Nov 2003 21:21:39 +0100 + +vim (1:6.2-145+1) unstable; urgency=low + + * new upstream patches (140 to 145), see README.gz for details + * added arabic support, thanks to Mohammed Elzubeir and Anmar Oueja + (closes: #216012) + * updated kvim patch to apply without conflicts to new vim upstream patches, + thanks to Mickael Marchand + * updated 01ruby_mkmf.diff and 11allow-threaded-perl.diff to apply without + conflicts to new vim upstream patches + * renamed ruby1.8 build-dependency to ruby + + -- Norbert Tretkowski Wed, 5 Nov 2003 22:51:15 +0100 + +vim (1:6.2-139+1) unstable; urgency=low + + * new upstream patches (128 to 139), see README.gz for details + * merge with kvim source package, thanks to Mickael Marchand + (closes: #214076) + + -- Norbert Tretkowski Sun, 2 Nov 2003 19:51:14 +0100 + +vim (1:6.2-127+1) unstable; urgency=low + + * new upstream patches (107 to 127), see README.gz for details + * used suggests instead of depends on vim for vim-doc + + -- Norbert Tretkowski Fri, 17 Oct 2003 12:45:15 +0200 + +vim (1:6.2-106+4) unstable; urgency=low + + * vim-gnome now conflict with vim-gtk, and vice versa (closes: #214580) + * using pre-depends to fix #211710 and to handle overwriting of moved gvimrc + was a really bad idea, used replaces instead (closes: #214759) + * added a ttf-bitstream-vera suggests to gui packages because it seems to be + the only font which works fine with gtk2 gui + * added a note about gui support to perl, python, ruby and tcl package + description + * corrected short description in vim-gnome package + + -- Norbert Tretkowski Wed, 8 Oct 2003 23:52:27 +0200 + +vim (1:6.2-106+3) unstable; urgency=low + + * moved vim-usermanual and vim-referencemanual to vim-doc package + (closes: #214462, #214556) + * removed perl, python, ruby, tcl support from vim-gtk and vim-gnome + (closes: #214422) + * gzipped /usr/share/vim/vim62/doc/help.txt (closes: #214115) + + -- Norbert Tretkowski Tue, 7 Oct 2003 14:43:23 +0200 + +vim (1:6.2-106+2) unstable; urgency=low + + * really removed html documentation from vim package (closes: #211710) + + -- Norbert Tretkowski Mon, 29 Sep 2003 19:09:11 +0200 + +vim (1:6.2-106+1) unstable; urgency=low + + * new upstream patches (99 to 106), see README.gz for details + * added a note to README.Debian about new modeline behaviour + (closes: #212696) + * helpztags update, fixes production of tag files in improper format which + vim can't understand (closes: #213032) + * temporary disabled copying debian/vim-install into vim package, waiting + for an update (see #213034 for details) + + -- Norbert Tretkowski Sat, 27 Sep 2003 23:26:43 +0200 + +vim (1:6.2-098+5) unstable; urgency=low + + * added a several requested vim-gnome package (closes: #211820) + + -- Norbert Tretkowski Fri, 26 Sep 2003 20:19:51 +0200 + +vim (1:6.2-098+4) unstable; urgency=low + + * the "Happy Birthday Norbert" release + * corrected buggy Depends line in debian/control for packages depending on + vim, which should fix build problems (closes: #212686) + + -- Norbert Tretkowski Thu, 25 Sep 2003 12:36:47 +0200 + +vim (1:6.2-098+3) unstable; urgency=low + + * yet another helpztags update + + -- Norbert Tretkowski Wed, 24 Sep 2003 15:30:41 +0200 + +vim (1:6.2-098+2) unstable; urgency=low + + * added a pre-depends on vim to vim-doc (closes: #211710) + * updated helpztags and modified debian/rules to create a manpage, + thanks again to Artur R. Czechowski (closes: #211763) + * compiled in runtime path extension and removed entry from vimrc + * changed build-depends from tcl8.3 to tcl8.4 + + -- Norbert Tretkowski Wed, 24 Sep 2003 12:19:26 +0200 + +vim (1:6.2-098+1) unstable; urgency=low + + * new major upstream release (6.2) (closes: #196411, #205204) + * new upstream patches (1 to 98), see README.gz for details + * new Co-Maintainer: Norbert Tretkowski + * started putting upstream changes in a separate file + * added a patch that adds s390 support for control file syntax + highlighting (closes: #114750) + * moved to ruby1.8 (closes: #211539) + * enabled cscope functionality in vim package (closes: #159728) + * reenabled perl support in vim-perl package (closes: #200410) + * modified runtimepath in vimrc, added a README.Debian, helpztags and + vim-install to vim package, thanks Artur R. Czechowski + * added a Pre-Depends to packages depending on vim for a smooth upgrade + from older releases + * updated slrnrc syntax highlighting file, thanks to Sebastian Krause + * modified Build-Depends for an easier build on woody + * bumped up Standards-Version (no changes) + * moved config file and symlinks for gui version from vim package to each + of the additional packages (closes: #114944, #153068, #155711) + * fixed debchangelog syntax match, thanks to Gerfried Fuchs and Uli + Martens (closes: #153426) + * moved html documentation to new vim-doc package (closes: #121075) + + -- Norbert Tretkowski Sun, 14 Sep 2003 22:48:51 +0200 + +vim (1:6.1-474+2) unstable; urgency=low + + * debian/patches/07scripts.vim: fix typo that causes all files to be syntax + highlighed as though they were cvs diff files (closes: #194583) + + -- Luca Filipozzi Mon, 26 May 2003 08:01:06 -0700 + +vim (1:6.1-474+1) unstable; urgency=low + + * debian/vim.postinst + debian/vim-variant.postinst: delete symlinks located + in /usr/doc (closes: #189858, #190022) + * debian/rules + debain/runtime/vimrc: applied a patch that causes build + system to not compress the top level vim documenation file, help.txt; this + is needed so that plugin documentation can be merged into the online help + (closes: #186673) [thanks to: Recai Oktas] + * debian/patches/02debcontrol.vim: applied a patch that prevents vim syntax + erroneous highlighting of email addresses in Debian control files + (closes: #186673) [thanks to: Dmitry Borodaenko] + * debian/patches/03debcontrol.vim: applied a patch that makes the syntax + highlighter recongize the new Debian sections: embedded, gnome, kde, + libdevel, perl, python + (closes: #193235) [thanks to: Branden Robinson] + * debian/patches/04vim.1: applied a patch that documents -X flag + (closes: #141804) [thanks to: Guido Guenther] + * debian/patches/05muttrc.vim: applied a patch that adds several keywords + starting with 'crypt-', reflecting recent changes in muttrc syntax + (closes: #190864) [thanks to: Marco Herrn] + * debian/patches/06tasm.vim: applied a patch that fixes minor typo + (closes: #165819) [thanks to: David Weinehall] + * debian/patches/07scripts.vim.diff: applied a patch that helps vim correctly + highlight cvs diff output + (closes: #152721) [thanks to: Guido Guenther] + * debian/patches/08sh.vim.diff: applied a patch that increases the strictness + of Bourne shell syntax highlighting with respect to "if [ ]" constructs + (closes: #140203) [thanks to: Malcolm Parsons] + * debian/patches/09c.vim.diff: applied a patch that adds additional signal + names to the list of recognized signals for syntax highlighting + (closes: #173797) [thanks to: Wolfram Quester] + * debian/patches/10apache.vim.diff: applied a patch that adds SSLEnable + to the list of recognized keyworkds (closes: #135243) + * debian/runtime/vimrc: applied a patch that makes vim set printoptions + paper to /etc/papersize as per Debian standards + (closes: #127830) [thanks to: Ken Shan] + * new upstream patches: + + 6.1.321: When 'mouse' includes 'n' but not 'v', don't allow starting + Visual mode with the mouse. + + 6.1.322: Win32: The host name is always "PC " plus the real host + name. + + 6.1.323: ":registers" doesn't stop listing for a "q" at the more + prompt. + + 6.1.324: Crash when dragging a vertical separator when + is remapped to jump to another window. + + 6.1.325: Shift-Tab is not automatically recognized in an xterm. + + 6.1.326: Using a search pattern may read from uninitialized data + (Yasuhiro Matsumoto) + + 6.1.327: When opening the "mbyte.txt" help file the utf-8 characters + are unreadable, because the fileencoding is forced to be latin1. + + 6.1.328: Prototype for enc_canon_search() is missing. + + 6.1.329: When editing a file "a b c" replacing "%" in ":Cmd %" or + ":next %" does not work properly. + + 6.1.330: GTK, Motif and Athena: Keypad keys produce the same code + as non-keypad keys, making it impossible to map them separately. + + 6.1.331: When translating the help files, "LOCAL ADDITIONS" no + longer marks the spot where help files from plugins are to be listed. + + 6.1.332: Win32: Loading Perl dynamically doesn't work with Perl + 5.8. Perl 5.8 also does not work with Cygwin and Ming. + + 6.1.333: Win32: Can't handle Unicode text on the clipboard. Can't + pass NUL byte, it becomes a line break. + + 6.1.334: Problem with drawing Hebrew characters. + + 6.1.335: Failure of obtaining the cursor position and window size + is ignored. + + 6.1.336: Warning for use of function prototypes of smsg(). + + 6.1.337: When using "finish" in debug mode in function B() for + ":call A(B())" does not stop after B() is finished. + + 6.1.338: When using a menu that checks out the current file from + Insert mode, there is no warning for the changed file until exiting + Insert mode. + + 6.1.339: Completion doesn't allow "g:" in ":let g:did_". (Benji + Fisher) + + 6.1.340: Win32: Can't compile the Perl interface with nmake. + + 6.1.341: In Insert mode with 'rightleft' set the cursor is drawn + halfway a double-wide character. For CTRL-R and CTRL-K in Insert + mode the " or ? is not displayed. + + 6.1.342: With 'rightleft' set typing "c" on a double-wide character + causes the cursor to be displayed one cell to the left. + + 6.1.343: Cannot compile with the +multi_byte feature but without + +rightleft. Cannot compile without the GUI. + + 6.1.344: When using ":silent filetype" the output is still put in + the message history. + + 6.1.345: Win32: 'imdisable' doesn't work. + + 6.1.346: The scroll wheel can only scroll the current window. + + 6.1.347: When using cscope to list matching tags, the listed number + is sometimes not equal to what cscope uses. + + 6.1.348: Wildmode with wildmenu: ":set wildmode=list,full", + ":colorscheme " results in "zellner" instead of the first + entry. (Anand Hariharan) + + 6.1.349: "vim --serverlist" when no server was ever started gives + an error message without "\n". "vim --serverlist" doesn't exit when + the X server can't be contacted, it starts Vim unexpectedly. + + 6.1.350: When entering a buffer with ":bnext" for the first time, + using an autocommand to restore the last used cursor position + doesn't work. + + 6.1.351: Crash when starting Vim the first time in an X server. (John + McGowan) + + 6.1.352: Win32: Crash when setting "imdisable" in _vimrc. + + 6.1.353: Problem with drawing Arabic characters. + + 6.1.354: MS-Windows 98: Notepad can't paste text copied from Vim when + 'encoding' is "utf-8". + + 6.1.355: In a regexp '\n' will never match anything in a string. + + 6.1.356: Compiler warnings for using convert_setup() and a few + other things. + + 6.1.357: CR in the quickfix window jumps to the error under the + cursor, but this doesn't work in Insert mode. + + 6.1.358: The tutor doesn't select another locale version properly. + + 6.1.359: Mac Carbon: Vim doesn't get focus when started from the + command line. Crash when using horizontal scroll bar. + + 6.1.360: In Insert mode CTRL-K ESC messes up a multi-byte character. + + 6.1.361: Cannot jump to a file mark with ":'M". + + 6.1.362: tgetent() may return zero for success. tgetflag() may + return -1 for an error. + + 6.1.363: byte2line() can return one more than the number of lines. + + 6.1.364: That the FileChangedShell autocommand event never nests + makes it difficult to reload a file in a normal way. + + 6.1.365: Setting a breakpoint in a sourced file with a relative + path name doesn't work. + + 6.1.366: Can't use Vim with Netbeans. + + 6.1.367: Setting a breakpoint in a function doesn't work. For + a sourced file it doesn't work when symbolic links are + involved. (Servatius Brandt) + + 6.1.368: Completion for ":map" does not include and +