From 01d9d9a1db45a00c2aed305fd83998e1d2d67ade Mon Sep 17 00:00:00 2001 From: fox0430 Date: Wed, 15 May 2019 01:00:09 +0900 Subject: [PATCH] Revert "Fix #287" This reverts commit f7c358319ecfc088c8fe2efbb45542f62c5d22b6. --- src/moepkg/visualmode.nim | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/moepkg/visualmode.nim b/src/moepkg/visualmode.nim index f2e2e0453..11836fb0c 100644 --- a/src/moepkg/visualmode.nim +++ b/src/moepkg/visualmode.nim @@ -72,7 +72,7 @@ proc yankBuffer(status: var EditorStatus, area: SelectArea) = status.registers.yankedLines.add(status.bufStatus[status.currentBuffer].buffer[i]) proc deleteBuffer(status: var EditorStatus, area: SelectArea) = - if status.bufStatus[status.currentBuffer].buffer[status.bufStatus[status.currentBuffer].currentLine].len < 1: return + if status.bufStatus[status.currentBuffer].buffer.len == 1 and status.bufStatus[status.currentBuffer].buffer[status.bufStatus[status.currentBuffer].currentLine].len < 1: return yankBuffer(status, area) for i in area.startLine .. area.endLine: