about summary refs log tree commit diff stats
diff options
context:
space:
mode:
-rw-r--r--select.lua12
1 files changed, 6 insertions, 6 deletions
diff --git a/select.lua b/select.lua
index 57791d5..1121085 100644
--- a/select.lua
+++ b/select.lua
@@ -102,6 +102,12 @@ function Text.to_pos(x,y)
   end
 end
 
+function Text.cut_selection()
+  local result = Text.selection()
+  Text.delete_selection()
+  return result
+end
+
 function Text.delete_selection()
   local minl,maxl = minmax(Selection1.line, Cursor1.line)
   local before = snapshot(minl, maxl)
@@ -172,9 +178,3 @@ function Text.selection()
   table.insert(result, Lines[maxl].data:sub(1, max_offset-1))
   return table.concat(result, '\n')
 end
-
-function Text.cut_selection()
-  local result = Text.selection()
-  Text.delete_selection()
-  return result
-end
>96 97 98 99 100 101 102 103 104 105 106 107 108 109 110 111 112 113 114 115 116 117 118 119 120 121 122 123 124 125 126 127 128 129 130 131 132 133 134