[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
[nongnu] elpa/swift-mode 04c8a62 442/496: Fix beginning-of-defun hanging
From: |
ELPA Syncer |
Subject: |
[nongnu] elpa/swift-mode 04c8a62 442/496: Fix beginning-of-defun hanging at the beginning of buffer |
Date: |
Sun, 29 Aug 2021 11:34:24 -0400 (EDT) |
branch: elpa/swift-mode
commit 04c8a621e9844ef3f7d53c41b046f71aadb1a9d2
Author: taku0 <mxxouy6x3m_github@tatapa.org>
Commit: taku0 <mxxouy6x3m_github@tatapa.org>
Fix beginning-of-defun hanging at the beginning of buffer
Fixes #157.
We would like to thank @dabrahams for reporting this, and @danielmartin for
suggesting the cause.
---
swift-mode-beginning-of-defun.el | 7 +++++--
1 file changed, 5 insertions(+), 2 deletions(-)
diff --git a/swift-mode-beginning-of-defun.el b/swift-mode-beginning-of-defun.el
index 26f276e..89263a2 100644
--- a/swift-mode-beginning-of-defun.el
+++ b/swift-mode-beginning-of-defun.el
@@ -92,8 +92,11 @@ and the region is not active."
(setq result (swift-mode:beginning-of-defun-backward))
(when (< (point) last-position)
(setq arg (1- arg)))
- (when (< 0 arg)
- (swift-mode:backward-token-or-list))))
+ (when (and (< 0 arg)
+ (eq 'outside-of-buffer
+ (swift-mode:token:type
+ (swift-mode:backward-token-or-list))))
+ (setq result nil))))
;; Moving forward
(setq result (swift-mode:beginning-of-defun-forward))
(when (and result (< pos (point)))
- [nongnu] elpa/swift-mode 0b1e5e8 420/496: Support raw texts, (continued)
- [nongnu] elpa/swift-mode 0b1e5e8 420/496: Support raw texts, ELPA Syncer, 2021/08/29
- [nongnu] elpa/swift-mode 348e153 422/496: Change buffer name of REPL, ELPA Syncer, 2021/08/29
- [nongnu] elpa/swift-mode 0eca818 431/496: Add test for Imenu, ELPA Syncer, 2021/08/29
- [nongnu] elpa/swift-mode ddc7ae6 436/496: Fix `adaptive-fill-regexp` for multiline comments, ELPA Syncer, 2021/08/29
- [nongnu] elpa/swift-mode 2e9bdc6 430/496: Ignore import declarations in Imenu, ELPA Syncer, 2021/08/29
- [nongnu] elpa/swift-mode b2d9cca 434/496: Fix small bugs, ELPA Syncer, 2021/08/29
- [nongnu] elpa/swift-mode 9d948d9 429/496: Add parser for function parameters for Imenu, ELPA Syncer, 2021/08/29
- [nongnu] elpa/swift-mode 1362849 435/496: Use `seq-mapcat` instead of `apply` '`nonc` and `mapcar`, ELPA Syncer, 2021/08/29
- [nongnu] elpa/swift-mode 64dff57 441/496: Update standard types, ELPA Syncer, 2021/08/29
- [nongnu] elpa/swift-mode 62cf880 437/496: Update electric indent inside multiline comments, ELPA Syncer, 2021/08/29
- [nongnu] elpa/swift-mode 04c8a62 442/496: Fix beginning-of-defun hanging at the beginning of buffer,
ELPA Syncer <=
- [nongnu] elpa/swift-mode 286b46e 459/496: Highlight #filePath, ELPA Syncer, 2021/08/29
- [nongnu] elpa/swift-mode fa22f12 461/496: Add tests for multiple trailing closures, ELPA Syncer, 2021/08/29
- [nongnu] elpa/swift-mode 2ab9ea1 458/496: Bump version to 8.0.2, ELPA Syncer, 2021/08/29
- [nongnu] elpa/swift-mode a067fe7 454/496: Add travis emacs version 26.2 and 26.3, ELPA Syncer, 2021/08/29
- [nongnu] elpa/swift-mode 29759f5 456/496: Fix indentation of generic-parameter-clause, ELPA Syncer, 2021/08/29
- [nongnu] elpa/swift-mode 5eb806b 470/496: Fix GitHub Action, ELPA Syncer, 2021/08/29
- [nongnu] elpa/swift-mode 9757df9 475/496: Improve regular expression to avoid false positives, ELPA Syncer, 2021/08/29
- [nongnu] elpa/swift-mode 5074a02 480/496: Fix font-lock of successive identifiers, ELPA Syncer, 2021/08/29
- [nongnu] elpa/swift-mode 2293e78 481/496: Fix indentation of throws without result type, ELPA Syncer, 2021/08/29
- [nongnu] elpa/swift-mode 19c956c 482/496: Fix GitHub Action, ELPA Syncer, 2021/08/29