[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
[elpa] scratch/dired-git-info cd60dd4 33/33: Check visible part of file
From: |
Clemens Radermacher |
Subject: |
[elpa] scratch/dired-git-info cd60dd4 33/33: Check visible part of file names for right formatting |
Date: |
Sun, 17 Feb 2019 13:03:33 -0500 (EST) |
branch: scratch/dired-git-info
commit cd60dd47a700bc87befdd276d32930e9a77e6623
Author: Clemens Radermacher <address@hidden>
Commit: Clemens Radermacher <address@hidden>
Check visible part of file names for right formatting
---
dired-git-info.el | 18 +++++++++++-------
1 file changed, 11 insertions(+), 7 deletions(-)
diff --git a/dired-git-info.el b/dired-git-info.el
index 09df3d4..94f7c48 100644
--- a/dired-git-info.el
+++ b/dired-git-info.el
@@ -146,8 +146,12 @@ info format and defaults to `dgi-commit-message-format'."
"Get lengths of FILE as displayed by dired."
(save-excursion
(dired-goto-file file)
- (length (buffer-substring (point)
- (line-end-position)))))
+ (let ((opos (point)))
+ (while (and (not (eolp))
+ (or (not dired-hide-details-mode)
+ (not (get-text-property (point) 'invisible))))
+ (forward-char 1))
+ (length (buffer-substring opos (point))))))
(defun dgi--get-commit-messages (files)
@@ -178,6 +182,10 @@ info format and defaults to `dgi-commit-message-format'."
(user-error "Not in a dired buffer"))
(unless (locate-dominating-file "." ".git")
(user-error "Not inside a git repository"))
+ (when dgi-auto-hide-details-p
+ (unless dired-hide-details-mode
+ (setq dgi--restore-no-details t)
+ (dired-hide-details-mode 1)))
(let* ((files (dgi--save-marked
(dired-unmark-all-marks)
(dired-toggle-marks)
@@ -203,11 +211,7 @@ info format and defaults to `dgi-commit-message-format'."
;; in combination with hl-line-mode overlay
(overlay-put ov 'display ovs)
;; hl line mode should have priority
- (overlay-put ov 'priority -60)))))))
- (when dgi-auto-hide-details-p
- (unless dired-hide-details-mode
- (setq dgi--restore-no-details t)
- (dired-hide-details-mode 1))))))
+ (overlay-put ov 'priority -60))))))))))
(provide 'dired-git-info)
- [elpa] scratch/dired-git-info 03c1711 19/33: Fixes according to checkdoc, (continued)
- [elpa] scratch/dired-git-info 03c1711 19/33: Fixes according to checkdoc, Clemens Radermacher, 2019/02/17
- [elpa] scratch/dired-git-info 2d57f89 12/33: Check for non existing files, Clemens Radermacher, 2019/02/17
- [elpa] scratch/dired-git-info e4090fa 01/33: Initial commit, Clemens Radermacher, 2019/02/17
- [elpa] scratch/dired-git-info 23b3d1e 18/33: Improve auto hide details, Clemens Radermacher, 2019/02/17
- [elpa] scratch/dired-git-info f7b5920 26/33: Improve dgi--get-commit-messages, Clemens Radermacher, 2019/02/17
- [elpa] scratch/dired-git-info 2e986ce 25/33: Allow command to run for dired derived modes, as well, Clemens Radermacher, 2019/02/17
- [elpa] scratch/dired-git-info 11a6cce 05/33: Update install instructions, Clemens Radermacher, 2019/02/17
- [elpa] scratch/dired-git-info 7803b82 16/33: Only mention some common options for message format docstring, Clemens Radermacher, 2019/02/17
- [elpa] scratch/dired-git-info f2117c8 28/33: Add .gitignore, Clemens Radermacher, 2019/02/17
- [elpa] scratch/dired-git-info 1c4ff64 23/33: Remove redundant :group declarations, Clemens Radermacher, 2019/02/17
- [elpa] scratch/dired-git-info cd60dd4 33/33: Check visible part of file names for right formatting,
Clemens Radermacher <=
- [elpa] scratch/dired-git-info 3280075 22/33: Update descriptions, Clemens Radermacher, 2019/02/17
- [elpa] scratch/dired-git-info 069695c 10/33: Update screenshot, Clemens Radermacher, 2019/02/17
- [elpa] scratch/dired-git-info 51135d8 07/33: Use actual displayed width of filename to determine spacing, Clemens Radermacher, 2019/02/17
- [elpa] scratch/dired-git-info 16c7a1a 15/33: Hide details when showing git info, Clemens Radermacher, 2019/02/17
- [elpa] scratch/dired-git-info 2ea5107 29/33: Rephrase commentary, Clemens Radermacher, 2019/02/17
- [elpa] scratch/dired-git-info b5551e7 30/33: Convert entry command to minor mode, Clemens Radermacher, 2019/02/17
- [elpa] scratch/dired-git-info 7755019 32/33: Get commit info from real file name, Clemens Radermacher, 2019/02/17
- [elpa] scratch/dired-git-info f539ba5 08/33: Align message parts of commit messages, Clemens Radermacher, 2019/02/17
- [elpa] scratch/dired-git-info 8afe378 09/33: Update docstring for message format, Clemens Radermacher, 2019/02/17
- [elpa] scratch/dired-git-info f9f8ab5 17/33: Cleanup, Clemens Radermacher, 2019/02/17