summaryrefslogtreecommitdiffstats
path: root/pairs.lua
diff options
context:
space:
mode:
Diffstat (limited to 'pairs.lua')
-rw-r--r--pairs.lua4
1 files changed, 2 insertions, 2 deletions
diff --git a/pairs.lua b/pairs.lua
index 8220f66..fbcb358 100644
--- a/pairs.lua
+++ b/pairs.lua
@@ -180,8 +180,8 @@ local function barf_linewise(content, start, finish)
if vis.mode == vis.modes.VISUAL_LINE then
local block = content:sub(start + 1, finish)
local newlines = l.match(l.Ct((l.Cp() * l.P"\n" + 1)^0), block)
- if #newlines > 1 then
- return start + newlines[1] + 1, start + newlines[#newlines]
+ if #newlines > 0 then
+ return start + newlines[1], start + newlines[#newlines]
end
end
return start, finish