diff options
author | Konstantin Kharlamov <Hi-Angel@yandex.ru> | 2021-02-16 12:49:30 +0100 |
---|---|---|
committer | Lars Ingebrigtsen <larsi@gnus.org> | 2021-02-16 12:49:53 +0100 |
commit | 5b10ca8f4f70cbdc51970b8b756d11f1dbf6e2f6 (patch) | |
tree | c135f19741e7c413e8fc7e13cec4eb47f62c7757 /lisp/vc/smerge-mode.el | |
parent | 03adc69af708e53d18f4efecbcaaee02f055ef56 (diff) | |
download | emacs-5b10ca8f4f70cbdc51970b8b756d11f1dbf6e2f6.tar.gz emacs-5b10ca8f4f70cbdc51970b8b756d11f1dbf6e2f6.tar.bz2 emacs-5b10ca8f4f70cbdc51970b8b756d11f1dbf6e2f6.zip |
make smerge-vc-next-conflict wrap around
* 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
(bug#46538).
Diffstat (limited to 'lisp/vc/smerge-mode.el')
-rw-r--r-- | lisp/vc/smerge-mode.el | 12 |
1 files changed, 6 insertions, 6 deletions
diff --git a/lisp/vc/smerge-mode.el b/lisp/vc/smerge-mode.el index c66a4fb2d6a..782c799273c 100644 --- a/lisp/vc/smerge-mode.el +++ b/lisp/vc/smerge-mode.el @@ -1468,12 +1468,12 @@ found, uses VC to try and find the next file with 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) |