summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorBastien <bzg@gnu.org>2017-03-16 22:15:11 +0100
committerBastien <bzg@gnu.org>2017-03-16 22:15:11 +0100
commite43f247e7cdb928c7f9c9d0bd5da2499336f375b (patch)
tree83ad181a4fa47217ccb2cc064cd1ebbff638eb4f
parent175543e5efe3787df3fed8683e6d749dcc0f16c4 (diff)
downloadorg-mode-e43f247e7cdb928c7f9c9d0bd5da2499336f375b.tar.gz
lisp/org-table.el: Bugfix: correctly handle increment of -/+ numbers
* lisp/org-table.el (org-table-copy-down): Bugfix: correctly handle increment of numbers with a -/+ sign.
-rw-r--r--lisp/org-table.el2
1 files changed, 1 insertions, 1 deletions
diff --git a/lisp/org-table.el b/lisp/org-table.el
index c055fb7..317e734 100644
--- a/lisp/org-table.el
+++ b/lisp/org-table.el
@@ -1155,7 +1155,7 @@ to a number. In the case of a timestamp, increment by days."
(- (org-time-string-to-absolute txt)
(org-time-string-to-absolute txt-up)))
((string-match org-ts-regexp3 txt) 1)
- ((string-match "^[0-9]+\\(\.[0-9]+\\)?" txt-up)
+ ((string-match "\\([-+]\\)?[0-9]+\\(?:\.[0-9]+\\)?" txt-up)
(- (string-to-number txt)
(string-to-number (match-string 0 txt-up))))
(t 1)))