Skip to content
GitLab
Projects
Groups
Snippets
Help
Loading...
Help
Help
Support
Community forum
Keyboard shortcuts
?
Submit feedback
Contribute to GitLab
Sign in / Register
Toggle navigation
Open sidebar
emacs
emacs
Commits
aec1ef07
Commit
aec1ef07
authored
Mar 18, 2008
by
Stefan Monnier
Browse files
(diff-end-of-hunk): Be careful not to overlook trailing
"+" lines not accounted for by counting "-" and context lines.
parent
117402b8
Changes
2
Hide whitespace changes
Inline
Side-by-side
Showing
2 changed files
with
21 additions
and
5 deletions
+21
-5
lisp/ChangeLog
lisp/ChangeLog
+7
-2
lisp/diff-mode.el
lisp/diff-mode.el
+14
-3
No files found.
lisp/ChangeLog
View file @
aec1ef07
2008-03-18 Stefan Monnier <monnier@iro.umontreal.ca>
* diff-mode.el (diff-end-of-hunk): Be careful not to overlook trailing
"+" lines not accounted for by counting "-" and context lines.
2008-03-16 Juri Linkov <juri@jurta.org>
* dired.el (dired-warn-writable): Rename to `dired-perm-write'.
(dired-perm-write): Rename
d
from `dired-warn-writable'.
(dired-perm-write): Rename from `dired-warn-writable'.
Change parent face from `font-lock-warning-face' to
`font-lock-comment-delimiter-face'.
(dired-warn-writable-face): Rename to `dired-perm-write-face'.
(dired-perm-write-face): Rename
d
from `dired-warn-writable-face'.
(dired-perm-write-face): Rename from `dired-warn-writable-face'.
(dired-font-lock-keywords): Replace `dired-warn-writable-face'
with `dired-perm-write-face'.
lisp/diff-mode.el
View file @
aec1ef07
...
...
@@ -402,12 +402,23 @@ See http://lists.gnu.org/archive/html/emacs-devel/2007-11/msg01990.html")
(
setq
style
(
cdr
(
assq
(
char-after
)
'
((
?@
.
unified
)
(
?*
.
context
))))))
(
goto-char
(
match-end
0
))
(
when
(
and
(
not
donttrustheader
)
(
match-end
2
))
(
let*
((
nold
(
string-to-number
(
match-string
2
)))
(
nnew
(
string-to-number
(
match-string
4
)))
(
endold
(
save-excursion
(
re-search-forward
(
if
diff-valid-unified-empty-line
"^[- \n]"
"^[- ]"
)
nil
t
(
string-to-number
(
match-string
2
)))
(
setq
end
(
line-beginning-position
2
)))))
nil
t
nold
)
(
line-beginning-position
2
)))
(
endnew
;; The hunk may end with a bunch of "+" lines, so the `end' is
;; then further than computed above.
(
save-excursion
(
re-search-forward
(
if
diff-valid-unified-empty-line
"^[+ \n]"
"^[+ ]"
)
nil
t
nnew
)
(
line-beginning-position
2
))))
(
setq
end
(
max
endold
endnew
)))))
;; We may have a first evaluation of `end' thanks to the hunk header.
(
unless
end
(
setq
end
(
and
(
re-search-forward
...
...
Write
Preview
Markdown
is supported
0%
Try again
or
attach a new file
.
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment