diff options
author | 2012-07-21 12:37:00 -0400 | |
---|---|---|
committer | 2012-07-21 12:37:00 -0400 | |
commit | 03f166897801c29e9357bce3214f02502eb7f252 (patch) | |
tree | 4066fae87259848d7d488bd39871964f6fd510fa /modules/textadept/bookmarks.lua | |
parent | 5a50a7e55b870ae66a6bb69fcd3a7bd1841f3d9b (diff) | |
download | textadept-03f166897801c29e9357bce3214f02502eb7f252.tar.gz textadept-03f166897801c29e9357bce3214f02502eb7f252.zip |
Converted some `buffer` "get" and "set" functions into properties.
Also updated to Scintilla 3.2.1.
Diffstat (limited to 'modules/textadept/bookmarks.lua')
-rw-r--r-- | modules/textadept/bookmarks.lua | 11 |
1 files changed, 5 insertions, 6 deletions
diff --git a/modules/textadept/bookmarks.lua b/modules/textadept/bookmarks.lua index 6284f25c..7c06ac64 100644 --- a/modules/textadept/bookmarks.lua +++ b/modules/textadept/bookmarks.lua @@ -90,13 +90,12 @@ function M.goto_bookmark() end local NCURSES_MARK = _SCINTILLA.constants.SC_MARK_CHARACTER + string.byte(' ') -if buffer then +-- Sets view properties for bookmark markers. +local function set_bookmark_properties() if NCURSES then buffer:marker_define(MARK_BOOKMARK, NCURSES_MARK) end - buffer:marker_set_back(MARK_BOOKMARK, M.MARK_BOOKMARK_COLOR) + buffer.marker_back[MARK_BOOKMARK] = M.MARK_BOOKMARK_COLOR end -events.connect(events.VIEW_NEW, function() - if NCURSES then buffer:marker_define(MARK_BOOKMARK, NCURSES_MARK) end - buffer:marker_set_back(MARK_BOOKMARK, M.MARK_BOOKMARK_COLOR) -end) +if buffer then set_bookmark_properties() end +events.connect(events.VIEW_NEW, set_bookmark_properties) return M |