lib/textbringer/commands/buffers.rb in textbringer-0.2.5 vs lib/textbringer/commands/buffers.rb in textbringer-0.2.6
- old
+ new
@@ -117,9 +117,17 @@
define_command(:newline,
doc: "Insert a newline.") do
Buffer.current.newline
end
+ define_command(:open_line,
+ doc: "Insert a newline leaving point before it.") do
+ buffer = Buffer.current
+ buffer.save_excursion do
+ buffer.newline
+ end
+ end
+
define_command(:delete_region,
doc: "Delete the region without copying.") do
Buffer.current.delete_region
end