mirror of
https://github.com/textmate/textmate.git
synced 2026-01-21 04:38:13 -05:00
Fix re-indented paste with a zig-zap selection
This commit is contained in:
@@ -547,7 +547,9 @@ namespace ng
|
||||
str = indent + str;
|
||||
if(complete)
|
||||
{
|
||||
std::string const& rightOfCaret = buffer.substr(index, buffer.eol(line));
|
||||
size_t const rightIndex = selections.last().max().index;
|
||||
size_t const lastLine = buffer.convert(rightIndex).line;
|
||||
std::string const& rightOfCaret = buffer.substr(rightIndex, buffer.eol(lastLine));
|
||||
if(!text::is_blank(rightOfCaret.data(), rightOfCaret.data() + rightOfCaret.size()))
|
||||
str += '\n';
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user