summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorBram Moolenaar <Bram@vim.org>2010-06-06 17:41:24 +0200
committerBram Moolenaar <Bram@vim.org>2010-06-06 17:41:24 +0200
commitdebe25a2a58f32a8301765c8c503c457ced3965d (patch)
treea2ca6803dc2f03e67bdf322dba6530d786284c63
parentfd29f4628ed53eef3d96a09ad2d0fa504edfcdfc (diff)
One more fix for conceal patch.
-rw-r--r--runtime/doc/syntax.txt11
-rw-r--r--runtime/doc/todo.txt15
-rw-r--r--src/ex_cmds.c7
-rw-r--r--src/gui_gtk_x11.c2
-rw-r--r--src/window.c1
5 files changed, 17 insertions, 19 deletions
diff --git a/runtime/doc/syntax.txt b/runtime/doc/syntax.txt
index 47a1aac797..b1176a0570 100644
--- a/runtime/doc/syntax.txt
+++ b/runtime/doc/syntax.txt
@@ -4521,14 +4521,21 @@ italic etc regions) in another. The 'scrollbind' option is useful here.
To set the current window to have the syntax "foo", separately from all other
windows on the buffer: >
:ownsyntax foo
+< *w:current_syntax*
+This will set the "w:current_syntax" variable to "foo". The value of
+"b:current_syntax" does not change. This is implemented by saving and
+restoring "b:current_syntax", since the syntax files do set
+"b:current_syntax". The value set by the syntax file is assigned to
+"w:current_syntax".
Once a window has its own syntax, syntax commands executed from other windows
on the same buffer (including :syntax clear) have no effect. Conversely,
syntax commands executed from that window do not effect other windows on the
same buffer.
-A window with its own syntax reverts to normal behaviour when another buffer
-is loaded into that window.
+A window with its own syntax reverts to normal behavior when another buffer
+is loaded into that window or the file is reloaded.
+When splitting the window, the new window will use the original syntax.
==============================================================================
16. Color xterms *xterm-color* *color-xterm*
diff --git a/runtime/doc/todo.txt b/runtime/doc/todo.txt
index c1999cb987..a69f8eabb2 100644
--- a/runtime/doc/todo.txt
+++ b/runtime/doc/todo.txt
@@ -1084,18 +1084,12 @@ restored. (Luc St-Louis)
Vim 7.3:
-- Included conceal patch.
- HL disappears in other window:
- :sp
- :ownsyntax perl
- :e
- Documentation update:
- remove w:ownsyntax, automatically set w:current_syntax to the value of
- b:current_syntax after loading a syntax file. :ownsyntax only sets
- w:current_syntax.
- using NSIS 2.46: install on Windows 7 works, but no "Edit with Vim" menu.
Use register_shell_extension()? (George Reilly, 2010 May 26)
Ron's version: http://dev.ronware.org/p/vim/finfo?name=gvim.nsi
+- Update for crypt code to use salt. (Mohsin May 30)
+ Make the strengthen_key value 10000, equivalent to crypting 10 Kbyte of
+ text.
- Also crypt the swap file, each block separately. Change mf_write() and
mf_read().
- How to get b_p_key to these functions? -> Store buf_T pointer in mfp.
@@ -1106,9 +1100,6 @@ Vim 7.3:
- Fill the gaps in the block with random bytes, otherwise it's easy to
check for correct password by finding NUL bytes.
- Verify recovery works.
-- Update for crypt code to use salt. (Mohsin May 30)
- Make the strengthen_key value configurable and store it in the header?
- Or just use 10000, equivalent to crypting 10 Kbyte of text.
- undofile: keep markers where the file was written/read, so that it's easy to
go back to a saved version of the file: ":earlier 1f" (f for file)?
Also add ":earlier 1d" (d for day).
diff --git a/src/ex_cmds.c b/src/ex_cmds.c
index 2ffaa3e217..53dc0adf38 100644
--- a/src/ex_cmds.c
+++ b/src/ex_cmds.c
@@ -3571,9 +3571,6 @@ do_ecmd(fnum, ffname, sfname, eap, newlnum, flags, oldwin)
new_name = NULL;
#endif
buf_freeall(curbuf, FALSE, FALSE); /* free all things for buffer */
-#ifdef FEAT_SYN_HL
- reset_synblock(curwin); /* remove any ownsyntax */
-#endif
#ifdef FEAT_AUTOCMD
/* If autocommands deleted the buffer we were going to re-edit, give
* up and jump to the end. */
@@ -3618,6 +3615,10 @@ do_ecmd(fnum, ffname, sfname, eap, newlnum, flags, oldwin)
*/
check_arg_idx(curwin);
+#ifdef FEAT_SYN_HL
+ reset_synblock(curwin); /* remove any ownsyntax */
+#endif
+
#ifdef FEAT_AUTOCMD
if (!auto_buf)
#endif
diff --git a/src/gui_gtk_x11.c b/src/gui_gtk_x11.c
index 86cd59cea0..2db203b855 100644
--- a/src/gui_gtk_x11.c
+++ b/src/gui_gtk_x11.c
@@ -4231,7 +4231,7 @@ gui_mch_open(void)
#ifdef HAVE_GTK2
/* For GTK2 changing the size of the form widget doesn't cause window
* resizing. */
- if (gtk_socket_id == 0)
+ if (gtk_socket_id == 0)
gtk_window_resize(GTK_WINDOW(gui.mainwin), pixel_width, pixel_height);
#else
gtk_form_set_size(GTK_FORM(gui.formwin), pixel_width, pixel_height);
diff --git a/src/window.c b/src/window.c
index 239a8094ee..9f7131e90d 100644
--- a/src/window.c
+++ b/src/window.c
@@ -1176,7 +1176,6 @@ win_init(newp, oldp, flags)
newp->w_buffer = oldp->w_buffer;
#ifdef FEAT_SYN_HL
- /* TODO: use reference count? */
newp->w_s = &(oldp->w_buffer->b_s);
#endif
oldp->w_buffer->b_nwindows++;