aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authormitchell <70453897+667e-11@users.noreply.github.com>2014-06-07 10:56:29 -0400
committermitchell <70453897+667e-11@users.noreply.github.com>2014-06-07 10:56:29 -0400
commit51e373d39fb303bc378adb29fcb39010289e8d86 (patch)
tree37ac82064ea625ce730f2e362e21ae59a8651f7b
parent7337a375d0c2a2341d13d8ec300b4e6f68368522 (diff)
downloadtextadept-51e373d39fb303bc378adb29fcb39010289e8d86.tar.gz
textadept-51e373d39fb303bc378adb29fcb39010289e8d86.zip
Added parameter to `events.UPDATE_UI`.
-rw-r--r--core/events.lua14
-rw-r--r--src/textadept.c4
2 files changed, 17 insertions, 1 deletions
diff --git a/core/events.lua b/core/events.lua
index 6e473212..f4f520c5 100644
--- a/core/events.lua
+++ b/core/events.lua
@@ -218,6 +218,18 @@ local M = {}
-- Emitted after reaching a save point.
-- @field UPDATE_UI (string)
-- Emitted after the view is visually updated.
+-- Arguments:
+--
+-- * _`updated`_: A bitmask of changes since the last update.
+--
+-- + `buffer.UPDATE_CONTENT`
+-- Buffer contents, styling, or markers have changed.
+-- + `buffer.UPDATE_SELECTION`
+-- Buffer selection has changed.
+-- + `buffer.UPDATE_V_SCROLL`
+-- Buffer has scrolled vertically.
+-- + `buffer.UPDATE_H_SCROLL`
+-- Buffer has scrolled horizontally.
-- @field URI_DROPPED (string)
-- Emitted after dragging and dropping a URI into a view.
-- Arguments:
@@ -328,7 +340,7 @@ local scnotifications = {
[c.SCN_SAVEPOINTREACHED] = {'save_point_reached'},
[c.SCN_SAVEPOINTLEFT] = {'save_point_left'},
[c.SCN_DOUBLECLICK] = {'double_click', 'position', 'line', 'modifiers'},
- [c.SCN_UPDATEUI] = {'update_ui'},
+ [c.SCN_UPDATEUI] = {'update_ui', 'updated'},
[c.SCN_MODIFIED] = {'modified', 'modification_type'}, -- undocumented
[c.SCN_MARGINCLICK] = {'margin_click', 'margin', 'position', 'modifiers'},
[c.SCN_USERLISTSELECTION] = {
diff --git a/src/textadept.c b/src/textadept.c
index b6d90a86..bbf86d98 100644
--- a/src/textadept.c
+++ b/src/textadept.c
@@ -1931,6 +1931,10 @@ static void lL_notify(lua_State *L, struct SCNotification *n) {
lua_pushinteger(L, n->margin), lua_setfield(L, -2, "margin");
lua_pushinteger(L, n->x), lua_setfield(L, -2, "x");
lua_pushinteger(L, n->y), lua_setfield(L, -2, "y");
+ //lua_pushinteger(L, n->token), lua_setfield(L, -2, "token");
+ //lua_pushinteger(L, n->annotationLinesAdded);
+ //lua_setfield(L, -2, "annotation_lines_added");
+ lua_pushinteger(L, n->updated), lua_setfield(L, -2, "updated");
lL_event(L, "SCN", LUA_TTABLE, luaL_ref(L, LUA_REGISTRYINDEX), -1);
}