~reykjalin/fonn_extensions

b8bb610d2db2e6da6d4edac5989e2f4ef3e8a7c9 — KristoĢfer R 4 months ago 41404e8
add scroll up and scroll down commands
1 files changed, 7 insertions(+), 0 deletions(-)

M modal_editing/extension.lua
M modal_editing/extension.lua => modal_editing/extension.lua +7 -0
@@ 80,6 80,13 @@ function handle_normal_mode(key, modifier_mask)
    mode = "goto"
  end

  if key_string == "D" and modifier_mask == editor.modifiers.control then
    editor.scroll_down()
  end
  if key_string == "U" and modifier_mask == editor.modifiers.control then
    editor.scroll_up()
  end

  if key_string == "c" and modifier_mask == editor.modifiers.none then
    mode = "insert"
    editor.caret.set_style(editor.caret.style.line)