From 16acf6c8d868582f445c1735c083a4f733c34e6f Mon Sep 17 00:00:00 2001 From: mitchell <70453897+667e-11@users.noreply.github.com> Date: Fri, 16 Mar 2018 16:42:32 -0400 Subject: Fixed accidental stripping of leading newlines in pasted text. --- modules/textadept/editing.lua | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) (limited to 'modules/textadept') diff --git a/modules/textadept/editing.lua b/modules/textadept/editing.lua index 6a30d04f..cbf52621 100644 --- a/modules/textadept/editing.lua +++ b/modules/textadept/editing.lua @@ -242,7 +242,7 @@ function M.paste() end -- Strip leading indentation from clipboard text. local text = ui.clipboard_text - local lead = text:match('^%s*') + local lead = text:match('^[ \t]*') if lead ~= '' then text = text:sub(#lead + 1):gsub('\n'..lead, '\n') end -- Change indentation to match buffer indentation settings. local tab_width = math.huge -- cgit v1.2.3