diff options
author | 2018-03-16 16:42:32 -0400 | |
---|---|---|
committer | 2018-03-16 16:42:32 -0400 | |
commit | 16acf6c8d868582f445c1735c083a4f733c34e6f (patch) | |
tree | 1a744693ce163ff52c48d8c34df4404ff61dc30d /modules/textadept | |
parent | 79b8277bd9275924f90e5fd70118612f59ea31cc (diff) | |
download | textadept-16acf6c8d868582f445c1735c083a4f733c34e6f.tar.gz textadept-16acf6c8d868582f445c1735c083a4f733c34e6f.zip |
Fixed accidental stripping of leading newlines in pasted text.
Diffstat (limited to 'modules/textadept')
-rw-r--r-- | modules/textadept/editing.lua | 2 |
1 files changed, 1 insertions, 1 deletions
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 |