about summary refs log tree commit diff stats
diff options
context:
space:
mode:
-rw-r--r--source_edit.lua7
1 files changed, 6 insertions, 1 deletions
diff --git a/source_edit.lua b/source_edit.lua
index b927cb5..242aca5 100644
--- a/source_edit.lua
+++ b/source_edit.lua
@@ -288,7 +288,6 @@ function edit.mouse_released(State, x,y, mouse_button)
 end
 
 function edit.textinput(State, t)
-  for _,line_cache in ipairs(State.line_cache) do line_cache.starty = nil end  -- just in case we scroll
   if State.search_term then
     State.search_term = State.search_term..t
     State.search_text = nil
@@ -300,6 +299,7 @@ function edit.textinput(State, t)
     p.name = p.name..t
     record_undo_event(State, {before=before, after=snapshot(State, State.lines.current_drawing_index)})
   else
+    for _,line_cache in ipairs(State.line_cache) do line_cache.starty = nil end  -- just in case we scroll
     Text.textinput(State, t)
   end
   schedule_save(State)
@@ -543,6 +543,7 @@ function edit.run_after_textinput(State, t)
   edit.textinput(State, t)
   edit.key_released(State, t)
   App.screen.contents = {}
+  edit.update(State, 0)
   edit.draw(State)
 end
 
@@ -551,6 +552,7 @@ function edit.run_after_keychord(State, chord)
   edit.keychord_pressed(State, chord)
   edit.key_released(State, chord)
   App.screen.contents = {}
+  edit.update(State, 0)
   edit.draw(State)
 end
 
@@ -560,6 +562,7 @@ function edit.run_after_mouse_click(State, x,y, mouse_button)
   App.fake_mouse_release(x,y, mouse_button)
   edit.mouse_released(State, x,y, mouse_button)
   App.screen.contents = {}
+  edit.update(State, 0)
   edit.draw(State)
 end
 
@@ -567,6 +570,7 @@ function edit.run_after_mouse_press(State, x,y, mouse_button)
   App.fake_mouse_press(x,y, mouse_button)
   edit.mouse_pressed(State, x,y, mouse_button)
   App.screen.contents = {}
+  edit.update(State, 0)
   edit.draw(State)
 end
 
@@ -574,5 +578,6 @@ function edit.run_after_mouse_release(State, x,y, mouse_button)
   App.fake_mouse_release(x,y, mouse_button)
   edit.mouse_released(State, x,y, mouse_button)
   App.screen.contents = {}
+  edit.update(State, 0)
   edit.draw(State)
 end
ref='#n180'>180 181 182 183 184 185 186 187 188 189 190 191 192 193 194 195 196 197 198 199 200 201 202 203 204 205 206 207 208 209 210 211 212 213 214 215 216 217 218 219 220 221 222 223 224 225 226 227 228 229 230 231 232 233 234 235 236 237 238 239 240 241 242 243 244 245 246 247 248 249 250 251 252 253 254 255 256 257 258 259 260 261 262 263 264 265 266 267 268 269 270 271 272 273 274 275 276 277 278 279 280 281 282 283