]> git.ipfire.org Git - thirdparty/vim.git/commitdiff
updated for version 7.0222
authorBram Moolenaar <Bram@vim.org>
Sun, 12 Mar 2006 21:50:18 +0000 (21:50 +0000)
committerBram Moolenaar <Bram@vim.org>
Sun, 12 Mar 2006 21:50:18 +0000 (21:50 +0000)
runtime/optwin.vim
src/buffer.c
src/ex_docmd.c
src/normal.c
src/spell.c
src/vim.h
src/window.c

index 7dff51319f948b9d10692001d1dd06d9f5ebdfae..bebeeda1aa6765d6eb2f165a1acd7d9c50454cd9 100644 (file)
@@ -1,7 +1,7 @@
 " These commands create the option window.
 "
 " Maintainer:  Bram Moolenaar <Bram@vim.org>
-" Last Change: 2006 Mar 10
+" Last Change: 2006 Mar 12
 
 " If there already is an option window, jump to that one.
 if bufwinnr("option-window") > 0
@@ -389,6 +389,12 @@ call <SID>OptionG("hl", &hl)
 call append("$", "hlsearch\thighlight all matches for the last used search pattern")
 call <SID>BinOptionG("hls", &hls)
 if has("syntax")
+  call append("$", "cursorcolumn\thighlight the screen column of the cursor")
+  call append("$", "\t(local to window)")
+  call <SID>BinOptionL("cuc")
+  call append("$", "cursorline\thighlight the screen line of the cursor")
+  call append("$", "\t(local to window)")
+  call <SID>BinOptionL("cul")
   call append("$", "spell\thighlight spelling mistakes")
   call append("$", "\t(local to window)")
   call <SID>BinOptionL("spell")
index 6010dbd40b4ce42954b9ab32cda9a24634925940..44aac3453ed8ae10e19c5d6e5bac754189acb9b2 100644 (file)
@@ -1713,6 +1713,8 @@ free_buf_options(buf, free_p_ff)
     clear_string_option(&buf->b_p_nf);
 #ifdef FEAT_SYN_HL
     clear_string_option(&buf->b_p_syn);
+#endif
+#ifdef FEAT_SPELL
     clear_string_option(&buf->b_p_spc);
     clear_string_option(&buf->b_p_spf);
     vim_free(buf->b_cap_prog);
@@ -2389,7 +2391,7 @@ get_winopts(buf)
        curwin->w_p_fdl = p_fdls;
 #endif
 
-#ifdef FEAT_SYN_HL
+#ifdef FEAT_SPELL
     if (curwin->w_p_spell && *buf->b_p_spl != NUL)
        did_set_spelllang(buf);
 #endif
index 7e5e3b17560303f0265e5cce61dbc466da3d1368..f1c6bb1e04523b60b157e26254921d65569b5f3b 100644 (file)
@@ -236,6 +236,8 @@ static void ex_popup __ARGS((exarg_T *eap));
 #endif
 #ifndef FEAT_SYN_HL
 # define ex_syntax             ex_ni
+#endif
+#ifndef FEAT_SPELL
 # define ex_spell              ex_ni
 # define ex_mkspell            ex_ni
 # define ex_spelldump          ex_ni
@@ -7025,6 +7027,7 @@ theend:
 # endif
 }
 
+#if defined(FEAT_MOUSE) || defined(PROTO)
 /*
  * Open a new tab page.
  */
@@ -7039,6 +7042,7 @@ tabpage_new()
     ea.arg = (char_u *)"";
     ex_splitview(&ea);
 }
+#endif
 
 /*
  * :tabnext command
@@ -10588,7 +10592,7 @@ ex_nohlsearch(eap)
     exarg_T    *eap;
 {
     no_hlsearch = TRUE;
-    redraw_all_later(NOT_VALID);
+    redraw_all_later(SOME_VALID);
 }
 
 /*
@@ -10618,7 +10622,7 @@ ex_match(eap)
     {
        vim_free(curwin->w_match[mi].regprog);
        curwin->w_match[mi].regprog = NULL;
-       redraw_later(NOT_VALID);        /* always need a redraw */
+       redraw_later(SOME_VALID);       /* always need a redraw */
     }
 
     if (ends_excmd(*eap->arg))
index a2e3e7fd6fe3e9267bd54e6cd9104b1cd91b3b69..5fb0473ad525a09230d349081da95410408547c6 100644 (file)
@@ -4512,7 +4512,7 @@ nv_zet(cap)
     long       old_fdl = curwin->w_p_fdl;
     int                old_fen = curwin->w_p_fen;
 #endif
-#ifdef FEAT_SYN_HL
+#ifdef FEAT_SPELL
     int                undo = FALSE;
 #endif
 
@@ -4885,7 +4885,7 @@ dozet:
 
 #endif /* FEAT_FOLDING */
 
-#ifdef FEAT_SYN_HL
+#ifdef FEAT_SPELL
     case 'u':  /* "zug" and "zuw": undo "zg" and "zw" */
                ++no_mapping;
                ++allow_keys;   /* no mapping for nchar, but allow key codes */
@@ -6410,7 +6410,7 @@ nv_brackets(cap)
     }
 #endif
 
-#ifdef FEAT_SYN_HL
+#ifdef FEAT_SPELL
     /*
      * "[s", "[S", "]s" and "]S": move to next spell error.
      */
index 036f60c1842f76aa730c42c90800b5480624e77a..4a65aeeaaaa0fb1e628e726657cad8490a421b30 100644 (file)
 
 #include "vim.h"
 
-#if defined(FEAT_SYN_HL) || defined(PROTO)
+#if defined(FEAT_SPELL) || defined(PROTO)
 
 #ifdef HAVE_FCNTL_H
 # include <fcntl.h>
@@ -1999,8 +1999,10 @@ spell_move_to(wp, dir, allwords, curline, attrp)
     char_u     *endp;
     hlf_T      attr;
     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;
@@ -2087,6 +2089,7 @@ spell_move_to(wp, dir, allwords, curline, attrp)
                                                     : p - buf)
                                                  > wp->w_cursor.col)))
                    {
+# ifdef FEAT_SYN_HL
                        if (has_syntax)
                        {
                            col = p - buf;
@@ -2094,6 +2097,7 @@ spell_move_to(wp, dir, allwords, curline, attrp)
                                                       FALSE, &can_spell);
                        }
                        else
+#endif
                            can_spell = TRUE;
 
                        if (can_spell)
@@ -4554,7 +4558,7 @@ spell_reload_one(fname, added_word)
            if (spell_load_file(fname, NULL, slang, FALSE) == NULL)
                /* reloading failed, clear the language */
                slang_clear(slang);
-           redraw_all_later(NOT_VALID);
+           redraw_all_later(SOME_VALID);
            didit = TRUE;
        }
     }
@@ -9003,7 +9007,7 @@ spell_add_word(word, len, bad, index, undo)
        if (buf != NULL)
            buf_reload(buf, buf->b_orig_mode);
 
-       redraw_all_later(NOT_VALID);
+       redraw_all_later(SOME_VALID);
     }
 }
 
@@ -15476,4 +15480,4 @@ expand_spelling(lnum, col, pat, matchp)
 }
 #endif
 
-#endif  /* FEAT_SYN_HL */
+#endif  /* FEAT_SPELL */
index e2514cf0a29544dae8da4467c959c5fdd8925bb1..5b176d453a28607752f01bf0757ddc27a2f207ea 100644 (file)
--- a/src/vim.h
+++ b/src/vim.h
@@ -510,6 +510,7 @@ extern char *(*dyn_libintl_textdomain)(const char *domainname);
 #define INVERTED               20  /* redisplay inverted part that changed */
 #define INVERTED_ALL           25  /* redisplay whole inverted part */
 #define REDRAW_TOP             30  /* display first w_upd_rows screen lines */
+#define SOME_VALID             35  /* like NOT_VALID but may scroll */
 #define NOT_VALID              40  /* buffer needs complete redraw */
 #define CLEAR                  50  /* screen messed up, clear it */
 
@@ -1180,15 +1181,18 @@ typedef enum
     , HLF_TP       /* tabpage line */
     , HLF_TPS      /* tabpage line selected */
     , HLF_TPF      /* tabpage line filler */
+    , HLF_CUC      /* 'cursurcolumn' */
+    , HLF_CUL      /* 'cursurline' */
     , HLF_COUNT            /* MUST be the last one */
 } hlf_T;
 
-/* the HL_FLAGS must be in the same order as the HLF_ enums! */
+/* The HL_FLAGS must be in the same order as the HLF_ enums!
+ * When chainging this also adjust the default for 'highlight'. */
 #define HL_FLAGS {'8', '@', 'd', 'e', 'h', 'i', 'l', 'm', 'M', \
                  'n', 'r', 's', 'S', 'c', 't', 'v', 'V', 'w', 'W', \
                  'f', 'F', 'A', 'C', 'D', 'T', '>', \
                  'B', 'P', 'R', 'L', \
-                 '+', '=', 'x', 'X', '*', '#', '_'}
+                 '+', '=', 'x', 'X', '*', '#', '_', '!', '.'}
 
 /*
  * Boolean constants
index 4af25aa92f2fb8aee249e2d0bad4f7d4426adfe1..10bb8734340d3315306d2e1ce50c2d18b985909d 100644 (file)
@@ -4733,7 +4733,7 @@ win_drag_status_line(dragwin, offset)
     p_ch = Rows - cmdline_row;
     if (p_ch < 1)
        p_ch = 1;
-    redraw_all_later(NOT_VALID);
+    redraw_all_later(SOME_VALID);
     showmode();
 }
 
@@ -4986,7 +4986,7 @@ win_new_height(wp, height)
     wp->w_prev_fraction_row = wp->w_wrow;
 
     win_comp_scroll(wp);
-    redraw_win_later(wp, NOT_VALID);
+    redraw_win_later(wp, SOME_VALID);
 #ifdef FEAT_WINDOWS
     wp->w_redr_status = TRUE;
 #endif
@@ -5184,7 +5184,7 @@ last_status_rec(fr, statusline)
            else
                win_new_height(wp, wp->w_height - 1);
            comp_col();
-           redraw_all_later(NOT_VALID);
+           redraw_all_later(SOME_VALID);
        }
     }
 #ifdef FEAT_VERTSPLIT