[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
[elpa] 06/18: Fix error in approximation to (line-number-at-pos (point-m
From: |
Leo Liu |
Subject: |
[elpa] 06/18: Fix error in approximation to (line-number-at-pos (point-max)) |
Date: |
Sat, 05 Apr 2014 01:25:15 +0000 |
leoliu pushed a commit to branch master
in repository elpa.
commit 9527576d414771001f90c7a37219d8cb4d7c7a43
Author: Leo Liu <address@hidden>
Date: Wed Apr 2 08:41:12 2014 +0800
Fix error in approximation to (line-number-at-pos (point-max))
ggtags-global-output-lines >= (line-number-at-pos (point-max)) is not
always true.
---
ggtags.el | 12 ++++--------
1 files changed, 4 insertions(+), 8 deletions(-)
diff --git a/ggtags.el b/ggtags.el
index 4ded7ba..4acf610 100644
--- a/ggtags.el
+++ b/ggtags.el
@@ -1317,10 +1317,7 @@ commands `next-error' and `previous-error'.
compilation-filter-start t)
(replace-match ""))
(cl-incf ggtags-global-output-lines
- (count-lines (if (zerop ggtags-global-output-lines)
- (point-min)
- compilation-filter-start)
- (point)))
+ (count-lines compilation-filter-start (point)))
;; If the number of output lines is small
;; `ggtags-global-handle-exit' takes care of displaying the buffer.
(when (and (> ggtags-global-output-lines 30) ggtags-navigation-mode)
@@ -1328,10 +1325,9 @@ commands `next-error' and `previous-error'.
(when (and (eq ggtags-auto-jump-to-match 'history)
(numberp ggtags-auto-jump-to-match-target)
(not compilation-current-error)
- ;; `ggtags-global-output-lines' is imprecise but is
- ;; greater than (line-number-at-pos (point-max)) so use
- ;; it as first approximation.
- (> ggtags-global-output-lines ggtags-auto-jump-to-match-target)
+ ;; `ggtags-global-output-lines' is imprecise but use it
+ ;; as first approximation.
+ (> (+ 10 ggtags-global-output-lines)
ggtags-auto-jump-to-match-target)
(> (line-number-at-pos (point-max))
ggtags-auto-jump-to-match-target))
(ggtags-forward-to-line ggtags-auto-jump-to-match-target)
- [elpa] branch master updated (c5636ba -> 769f2f2), Leo Liu, 2014/04/04
- [elpa] 04/18: Add NEWS to README.rst for 0.8.0 and 0.8.1, Leo Liu, 2014/04/04
- [elpa] 02/18: New function ggtags-echo and use it, Leo Liu, 2014/04/04
- [elpa] 01/18: For #45: Fix popping up/down window for search with single match, Leo Liu, 2014/04/04
- [elpa] 03/18: Fix #45: Change default value of ggtags-auto-jump-to-match, Leo Liu, 2014/04/04
- [elpa] 06/18: Fix error in approximation to (line-number-at-pos (point-max)),
Leo Liu <=
- [elpa] 05/18: New function ggtags-eldoc-function for eldoc support, Leo Liu, 2014/04/04
- [elpa] 08/18: Don't activate eldoc support by default, Leo Liu, 2014/04/04
- [elpa] 09/18: Fix multiple calls of ggtags-show-definition, Leo Liu, 2014/04/04
- [elpa] 10/18: Make ggtags-eldoc-function work better when no project root, Leo Liu, 2014/04/04
- [elpa] 07/18: Refactor out ggtags-include-file from ggtags-find-tag-dwim, Leo Liu, 2014/04/04
- [elpa] 12/18: Make ggtags-use-project-gtagsconf work on remote projects, Leo Liu, 2014/04/04
- [elpa] 11/18: Revert "Fix ggtags-with-current-project to include GTAGSCONF", Leo Liu, 2014/04/04
- [elpa] 13/18: New macro ggtags-with-temp-message that reports execution time, Leo Liu, 2014/04/04
- [elpa] 14/18: Don't reply on excution order of filter and sentinel functions, Leo Liu, 2014/04/04
- [elpa] 15/18: Revert "Don't reply on excution order of filter and sentinel functions", Leo Liu, 2014/04/04