aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorSean Allred <code@seanallred.com>2014-12-19 12:30:55 -0500
committerSean Allred <code@seanallred.com>2014-12-19 12:30:55 -0500
commitad070b3401f47f11b8ad7b623f05aba7e769e03c (patch)
treebcbda12c638d1e3ac258e1620a419264ac63d789
parentefc284174d108d8c26a8b6e4fa3738cf697bd7e7 (diff)
parent486b950836a99b8eff847cecadd861426467284b (diff)
Merge pull request #168 from vermiculus/fix-section-navigation
Fix section navigation
-rw-r--r--sx-question-mode.el6
-rw-r--r--sx-question-print.el3
2 files changed, 3 insertions, 6 deletions
diff --git a/sx-question-mode.el b/sx-question-mode.el
index b376616..8fe6dfb 100644
--- a/sx-question-mode.el
+++ b/sx-question-mode.el
@@ -120,10 +120,8 @@ Prefix argument N moves N sections down or up."
;; If all we did was move out the current one, then move again
;; and we're guaranteed to reach the next section.
(sx-question-mode--goto-property-change 'section n))
- (let ((ov (car-safe (sx-question-mode--section-overlays-at (point)))))
- (unless (and (overlayp ov)
- (overlay-get ov 'invisible))
- (cl-decf count)))))
+ (unless (get-char-property (point) 'invisible)
+ (cl-decf count))))
(when (equal (selected-window) (get-buffer-window))
(when sx-question-mode-recenter-line
(let ((ov (sx-question-mode--section-overlays-at (line-end-position))))
diff --git a/sx-question-print.el b/sx-question-print.el
index 9f37b10..f11449b 100644
--- a/sx-question-print.el
+++ b/sx-question-print.el
@@ -238,8 +238,7 @@ DATA can represent a question or an answer."
;; Body
(insert "\n"
(propertize sx-question-mode-separator
- 'face 'sx-question-mode-header
- 'sx-question-mode--section 4))
+ 'face 'sx-question-mode-header))
(sx--wrap-in-overlay
'(face sx-question-mode-content-face)
(insert "\n"