[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
[nongnu] elpa/tablist d65235d 14/60: Fixed a bug regarding tablist colum
From: |
Philip Kaludercic |
Subject: |
[nongnu] elpa/tablist d65235d 14/60: Fixed a bug regarding tablist columns. |
Date: |
Sun, 1 Aug 2021 18:19:26 -0400 (EDT) |
branch: elpa/tablist
commit d65235db22c53d73d3bd95cba79d4cb5898ca451
Author: Andreas Politz <politza@hochschule-trier.de>
Commit: Andreas Politz <politza@hochschule-trier.de>
Fixed a bug regarding tablist columns.
* lisp/tablist.el (tablist-current-column): Compute the current column
in a more sane and hopefully correct way. Extended documentation.
---
tablist.el | 26 +++++++++++---------------
1 file changed, 11 insertions(+), 15 deletions(-)
diff --git a/tablist.el b/tablist.el
index a76a4dc..447ff48 100644
--- a/tablist.el
+++ b/tablist.el
@@ -1145,21 +1145,17 @@ Optional REVERT-P means, revert the display afterwards."
prop))
(defun tablist-current-column ()
- "Return the column number at point."
- (let ((columns
- (tablist-column-offsets))
- (index 0))
- (when (eq 0 (car columns))
- (cl-incf index))
- (while (and columns
- (<= (car columns)
- (current-column)))
- (cl-incf index)
- (setq columns (cdr columns)))
- (if (> index 0)
- (1- index)
- (if columns
- 0))))
+ "Return the column number at point.
+
+Returns nil, if point is before the first column."
+ (let ((column
+ (1- (cl-position
+ (current-column)
+ (append (tablist-column-offsets)
+ (list most-positive-fixnum))
+ :test (lambda (column offset) (> offset column))))))
+ (when (>= column 0)
+ column)))
(defun tablist-column-offsets ()
"Return a list of column positions.
- [nongnu] elpa/tablist 662243a 06/60: Remove minor-columns feature. Avoid a compiler warning., (continued)
- [nongnu] elpa/tablist 662243a 06/60: Remove minor-columns feature. Avoid a compiler warning., Philip Kaludercic, 2021/08/01
- [nongnu] elpa/tablist ad275a1 13/60: Merged branch renderpages., Philip Kaludercic, 2021/08/01
- [nongnu] elpa/tablist b90fff4 11/60: *** empty log message ***, Philip Kaludercic, 2021/08/01
- [nongnu] elpa/tablist 9019123 17/60: Remove tablist package., Philip Kaludercic, 2021/08/01
- [nongnu] elpa/tablist e10e086 18/60: Readded tablist package., Philip Kaludercic, 2021/08/01
- [nongnu] elpa/tablist 2077a99 19/60: Fix typo in description, and trailing line to satisfy package.el, Philip Kaludercic, 2021/08/01
- [nongnu] elpa/tablist 0f1e499 21/60: Add .dir-locals.el, Philip Kaludercic, 2021/08/01
- [nongnu] elpa/tablist 3ade133 15/60: Handle recent changes in eldoc., Philip Kaludercic, 2021/08/01
- [nongnu] elpa/tablist 6c03338 12/60: *** empty log message ***, Philip Kaludercic, 2021/08/01
- [nongnu] elpa/tablist 6d03439 20/60: Added dir-locals.el, Philip Kaludercic, 2021/08/01
- [nongnu] elpa/tablist d65235d 14/60: Fixed a bug regarding tablist columns.,
Philip Kaludercic <=
- [nongnu] elpa/tablist 9c0c56d 22/60: * lisp/pdf-occur.el: New and improved asynchronous, multiple file occur., Philip Kaludercic, 2021/08/01
- [nongnu] elpa/tablist a0c8192 23/60: Bumped version added NEWS., Philip Kaludercic, 2021/08/01
- [nongnu] elpa/tablist bf2e139 04/60: Fixed some bindings., Philip Kaludercic, 2021/08/01
- [nongnu] elpa/tablist f980411 08/60: Clean up help text., Philip Kaludercic, 2021/08/01
- [nongnu] elpa/tablist 82bf4b9 10/60: Updated copyright., Philip Kaludercic, 2021/08/01
- [nongnu] elpa/tablist c78eccd 24/60: Turn macro into a function, Philip Kaludercic, 2021/08/01
- [nongnu] elpa/tablist c5da8e6 32/60: Ignore .cask directory, Philip Kaludercic, 2021/08/01
- [nongnu] elpa/tablist 117c37f 33/60: Added Cask, Makefile and README files, Philip Kaludercic, 2021/08/01
- [nongnu] elpa/tablist 2262a80 35/60: Clear .dir-locals.el, Philip Kaludercic, 2021/08/01
- [nongnu] elpa/tablist f13b8f0 41/60: Improve README, Philip Kaludercic, 2021/08/01