From 06a5f1a62d1ae5f6aac86591c3cbdcbd64d6aab1 Mon Sep 17 00:00:00 2001 From: worldmaker Date: Mon, 28 Dec 2020 07:38:16 +0800 Subject: [PATCH] fix the missing break in JumpToMatchingBrace (#1960) In JumpToMatchingBrace, the loop should stop immediately after finding the matching bracket. It causes multiple jumps in certain situations: `(I [ ]{ }) => ( I[ ]{ })` --- internal/action/actions.go | 1 + 1 file changed, 1 insertion(+) diff --git a/internal/action/actions.go b/internal/action/actions.go index b69ac2d0..ee9c78aa 100644 --- a/internal/action/actions.go +++ b/internal/action/actions.go @@ -1195,6 +1195,7 @@ func (h *BufPane) JumpToMatchingBrace() bool { } else { h.Cursor.GotoLoc(matchingBrace.Move(1, h.Buf)) } + break } else { return false }