aboutsummaryrefslogtreecommitdiffstats
path: root/lisp/smerge-mode.el
diff options
context:
space:
mode:
authorStefan Monnier <[email protected]>2005-09-23 18:15:20 +0000
committerStefan Monnier <[email protected]>2005-09-23 18:15:20 +0000
commit91773964a584a74b2879cd344f6094aad4afd6e8 (patch)
tree23752239017779f5e75db8d9f6736b6cd67fa824 /lisp/smerge-mode.el
parent3480d92bb007bebdb644afbe667a02c00edbb334 (diff)
(smerge-remove-props): Cause re-highlighting of the whole conflict.
Diffstat (limited to 'lisp/smerge-mode.el')
-rw-r--r--lisp/smerge-mode.el12
1 files changed, 11 insertions, 1 deletions
diff --git a/lisp/smerge-mode.el b/lisp/smerge-mode.el
index 31c7c4f2f1..e777f3f821 100644
--- a/lisp/smerge-mode.el
+++ b/lisp/smerge-mode.el
@@ -335,7 +335,17 @@ according to `smerge-match-conflict'.")
(defun smerge-remove-props (beg end)
(remove-overlays beg end 'smerge 'refine)
- (remove-overlays beg end 'smerge 'conflict))
+ (remove-overlays beg end 'smerge 'conflict)
+ ;; Now that we use overlays rather than text-properties, this function
+ ;; does not cause refontification any more. It can be seen very clearly
+ ;; in buffers where jit-lock-contextually is not t, in which case deleting
+ ;; the "<<<<<<< foobar" leading line leaves the rest of the conflict
+ ;; highlighted as if it were still a valid conflict. Note that in many
+ ;; important cases (such as the previous example) we're actually called
+ ;; during font-locking so inhibit-modification-hooks is non-nil, so we
+ ;; can't just modify the buffer and expect font-lock to be triggered as in:
+ ;; (put-text-property beg end 'smerge-force-highlighting nil)
+ (remove-text-properties beg end '(fontified nil)))
(defun smerge-popup-context-menu (event)
"Pop up the Smerge mode context menu under mouse."