From 7447ac1229e4aab7e1ee4f95d321277640f0ee92 Mon Sep 17 00:00:00 2001 From: mitchell <70453897+667e-11@users.noreply.github.com> Date: Sun, 22 Feb 2009 14:49:05 -0500 Subject: Set MARK_*_COLOR for all new views rather than just the current one. --- modules/textadept/bookmarks.lua | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) (limited to 'modules/textadept/bookmarks.lua') diff --git a/modules/textadept/bookmarks.lua b/modules/textadept/bookmarks.lua index 78f95b13..fa890ec2 100644 --- a/modules/textadept/bookmarks.lua +++ b/modules/textadept/bookmarks.lua @@ -19,7 +19,6 @@ local MARK_BOOKMARK_COLOR = 0xC08040 -- Adds a bookmark to the current line. function add() local buffer = buffer - buffer:marker_set_back(MARK_BOOKMARK, MARK_BOOKMARK_COLOR) local line = buffer:line_from_position(buffer.current_pos) buffer:marker_add(line, MARK_BOOKMARK) end @@ -70,3 +69,7 @@ function goto_prev() end if line >= 0 then _m.textadept.editing.goto_line(line + 1) end end + +buffer:marker_set_back(MARK_BOOKMARK, MARK_BOOKMARK_COLOR) +textadept.events.add_handler('view_new', + function() buffer:marker_set_back(MARK_BOOKMARK, MARK_BOOKMARK_COLOR) end) -- cgit v1.2.3