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