GNU bug report logs -
#46538
Patch: wrap around smerge-vc-next-conflict if current file still has conflicts
Previous Next
Reported by: Konstantin Kharlamov <hi-angel <at> yandex.ru>
Date: Mon, 15 Feb 2021 18:53:01 UTC
Severity: normal
Tags: fixed, patch
Fixed in version 28.1
Done: Lars Ingebrigtsen <larsi <at> gnus.org>
Bug is archived. No further changes may be made.
Full log
View this message in rfc822 format
* lisp/vc/smerge-mode.el:
(smerge-vc-next-conflict): While searching for conflict markers, wrap
search around if current file is the last one with conflicts.
---
lisp/vc/smerge-mode.el | 12 ++++++------
1 file changed, 6 insertions(+), 6 deletions(-)
diff --git a/lisp/vc/smerge-mode.el b/lisp/vc/smerge-mode.el
index 3b09dfe5d2..b825fd9837 100644
--- a/lisp/vc/smerge-mode.el
+++ b/lisp/vc/smerge-mode.el
@@ -1469,12 +1469,12 @@ smerge-vc-next-conflict
(if (and (buffer-modified-p) buffer-file-name)
(save-buffer))
(vc-find-conflicted-file)
- (if (eq buffer (current-buffer))
- ;; Do nothing: presumably `vc-find-conflicted-file' already
- ;; emitted a message explaining there aren't any more conflicts.
- nil
- (goto-char (point-min))
- (smerge-next)))))))
+ (when (eq buffer (current-buffer))
+ ;; try to find a conflict marker in current file above the point
+ (let ((prev-pos (point)))
+ (goto-char (point-min))
+ (unless (ignore-errors (not (smerge-next)))
+ (goto-char prev-pos)))))))))
(provide 'smerge-mode)
--
2.30.1
This bug report was last modified 4 years and 96 days ago.
Previous Next
GNU bug tracking system
Copyright (C) 1999 Darren O. Benham,
1997,2003 nCipher Corporation Ltd,
1994-97 Ian Jackson.