diff options
author | 2010-12-29 16:02:15 -0500 | |
---|---|---|
committer | 2010-12-29 16:02:15 -0500 | |
commit | 79d1d1a0d5db28de960a373567d3305b17887fe9 (patch) | |
tree | bfb21e675bc040dca39eed708aa56592cba3317e | |
parent | ac1a1ab03ef259d18053be47a31ff389eb88e45c (diff) | |
download | textadept-79d1d1a0d5db28de960a373567d3305b17887fe9.tar.gz textadept-79d1d1a0d5db28de960a373567d3305b17887fe9.zip |
Do not call 'buffer_new' when splitting the view.
-rw-r--r-- | core/gui.lua | 2 | ||||
-rw-r--r-- | src/textadept.c | 3 |
2 files changed, 3 insertions, 2 deletions
diff --git a/core/gui.lua b/core/gui.lua index d057177d..ab255e67 100644 --- a/core/gui.lua +++ b/core/gui.lua @@ -96,6 +96,7 @@ connect('view_new', io.stderr:write(err) end end) +connect('view_new', events.emit('update_ui')) -- update document status local SETDIRECTFUNCTION = _SCINTILLA.properties.direct_function[1] local SETDIRECTPOINTER = _SCINTILLA.properties.doc_pointer[2] @@ -136,6 +137,7 @@ connect('buffer_new', local ok, err = pcall(run) if not ok then io.stderr:write(err) end end) +connect('buffer_new', events.emit('update_ui')) -- update document status -- Sets the title of the Textadept window to the buffer's filename. -- @param buffer The currently focused buffer. diff --git a/src/textadept.c b/src/textadept.c index cc971bbf..67b5e644 100644 --- a/src/textadept.c +++ b/src/textadept.c @@ -301,7 +301,7 @@ GtkWidget *new_view(sptr_t buffer_id) { focused_editor = editor; if (buffer_id) { SS(editor, SCI_SETDOCPOINTER, 0, buffer_id); - new_buffer(editor, FALSE, FALSE); + l_set_buffer_global(editor); } else new_buffer(editor, FALSE, TRUE); l_set_view_global(editor); l_emit_event("view_new", -1); @@ -346,7 +346,6 @@ void new_buffer(GtkWidget *editor, int create, int addref) { } l_set_buffer_global(editor); l_emit_event("buffer_new", -1); - l_emit_event("update_ui", -1); // update document status } /** |