summaryrefslogtreecommitdiffstats
path: root/src
diff options
context:
space:
mode:
authorBram Moolenaar <Bram@vim.org>2007-05-10 16:44:05 +0000
committerBram Moolenaar <Bram@vim.org>2007-05-10 16:44:05 +0000
commitb6799acd2d50b65eecfd3d691573628e3e8aa474 (patch)
treef0b27a7c1a05183d130a23c23fae6a1bd867398c /src
parent143c38cd31b5d4469e52048f355313718430bf0c (diff)
updated for version 7.1b
Diffstat (limited to 'src')
-rw-r--r--src/buffer.c20
-rw-r--r--src/getchar.c2
-rw-r--r--src/window.c4
3 files changed, 22 insertions, 4 deletions
diff --git a/src/buffer.c b/src/buffer.c
index 5df0857699..14b64c8eea 100644
--- a/src/buffer.c
+++ b/src/buffer.c
@@ -550,6 +550,24 @@ buf_freeall(buf, del_buf, wipe_buf)
#ifdef FEAT_DIFF
diff_buf_delete(buf); /* Can't use 'diff' for unloaded buffer. */
#endif
+
+#ifdef FEAT_FOLDING
+ /* No folds in an empty buffer. */
+# ifdef FEAT_WINDOWS
+ {
+ win_T *win;
+ tabpage_T *tp;
+
+ FOR_ALL_TAB_WINDOWS(tp, win)
+ if (win->w_buffer == buf)
+ clearFolding(win);
+ }
+# else
+ if (curwin->w_buffer == buf)
+ clearFolding(curwin);
+# endif
+#endif
+
#ifdef FEAT_TCL
tcl_buffer_free(buf);
#endif
@@ -2023,7 +2041,7 @@ buflist_findpat(pattern, pattern_end, unlisted, diffmode)
/*
* Try four ways of matching a listed buffer:
* attempt == 0: without '^' or '$' (at any position)
- * attempt == 1: with '^' at start (only at postion 0)
+ * attempt == 1: with '^' at start (only at position 0)
* attempt == 2: with '$' at end (only match at end)
* attempt == 3: with '^' at start and '$' at end (only full match)
* Repeat this for finding an unlisted buffer if there was no matching
diff --git a/src/getchar.c b/src/getchar.c
index c265a6f009..23611a118e 100644
--- a/src/getchar.c
+++ b/src/getchar.c
@@ -3427,7 +3427,7 @@ do_map(maptype, arg, mode, abbrev)
showmap(mp, map_table != maphash);
did_it = TRUE;
}
- else if (n != len) /* new entry is ambigious */
+ else if (n != len) /* new entry is ambiguous */
{
mpp = &(mp->m_next);
continue;
diff --git a/src/window.c b/src/window.c
index 0ee1ad40ac..4083f81871 100644
--- a/src/window.c
+++ b/src/window.c
@@ -81,7 +81,7 @@ static void win_new_height __ARGS((win_T *, int));
#define URL_SLASH 1 /* path_is_url() has found "://" */
#define URL_BACKSLASH 2 /* path_is_url() has found ":\\" */
-#define NOWIN (win_T *)-1 /* non-exisiting window */
+#define NOWIN (win_T *)-1 /* non-existing window */
#ifdef FEAT_WINDOWS
# define ROWS_AVAIL (Rows - p_ch - tabline_height())
@@ -536,7 +536,7 @@ wingotofile:
#endif
#ifdef FEAT_FIND_ID
-/* Go to the first occurence of the identifier under cursor along path in a
+/* Go to the first occurrence of the identifier under cursor along path in a
* new window -- webb
*/
case 'i': /* Go to any match */