From c9fdd8c4124aca8312584cf9337cb2707d73a1f6 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?=E6=9E=97=E4=B8=87=E7=A8=8B?= <1498425439@qq.com> Date: Mon, 18 Apr 2022 07:55:18 +0800 Subject: [PATCH] =?UTF-8?q?no=20select=20block=20copy=20a=20line=20instead?= =?UTF-8?q?=20of=20all=20|=20=E6=B2=A1=E6=9C=89=E9=80=89=E4=B8=AD=E4=B8=80?= =?UTF-8?q?=E5=9D=97=E6=96=87=E5=AD=97=E6=97=B6=E5=A4=8D=E5=88=B6=E4=B8=80?= =?UTF-8?q?=E8=A1=8C=E8=80=8C=E4=B8=8D=E6=98=AF=E5=85=A8=E9=83=A8?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .../java/io/github/linwancen/plugin/show/LineEndCopy.java | 6 ++---- 1 file changed, 2 insertions(+), 4 deletions(-) diff --git a/src/main/java/io/github/linwancen/plugin/show/LineEndCopy.java b/src/main/java/io/github/linwancen/plugin/show/LineEndCopy.java index ef5d73c..02aa2ae 100644 --- a/src/main/java/io/github/linwancen/plugin/show/LineEndCopy.java +++ b/src/main/java/io/github/linwancen/plugin/show/LineEndCopy.java @@ -52,10 +52,8 @@ public class LineEndCopy extends AnAction { Caret primaryCaret = editor.getCaretModel().getPrimaryCaret(); int start = primaryCaret.getSelectionStart(); int end = primaryCaret.getSelectionEnd(); - if (start != end) { - startLine = document.getLineNumber(start); - endLine = document.getLineNumber(end); - } + startLine = document.getLineNumber(start); + endLine = document.getLineNumber(end); } AppSettingsState settings = AppSettingsState.getInstance();