Only ask to abort when buffer is modified.
This commit is contained in:
parent
243de6b58c
commit
c2c15b67c4
1 changed files with 2 additions and 1 deletions
|
@ -133,7 +133,8 @@ current line down."
|
||||||
"Abort this rebase (by emptying the buffer, saving and closing
|
"Abort this rebase (by emptying the buffer, saving and closing
|
||||||
server connection)."
|
server connection)."
|
||||||
(interactive)
|
(interactive)
|
||||||
(when (y-or-n-p "Abort this rebase? ")
|
(when (or (not (buffer-modified-p))
|
||||||
|
(y-or-n-p "Abort this rebase? "))
|
||||||
(let ((buffer-read-only nil))
|
(let ((buffer-read-only nil))
|
||||||
(delete-region (point-min) (point-max))
|
(delete-region (point-min) (point-max))
|
||||||
(save-buffer)
|
(save-buffer)
|
||||||
|
|
Loading…
Add table
Reference in a new issue