summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorThierry Volpiatto <thievol@posteo.net>2021-03-24 15:43:44 +0100
committerThierry Volpiatto <thievol@posteo.net>2021-03-24 15:45:13 +0100
commit238aaf66da28e8cb5be97bddfcd37b20f1969343 (patch)
tree8b6986269f67a27f7c42a4798f43026a4a8b368f
parentfc7edb54fe1cd23039f99f0e8999b5b7e0ae804c (diff)
Optimize table searching in help
-rw-r--r--helm-lib.el9
1 files changed, 5 insertions, 4 deletions
diff --git a/helm-lib.el b/helm-lib.el
index 7d05a7c2..46ec28b2 100644
--- a/helm-lib.el
+++ b/helm-lib.el
@@ -49,6 +49,7 @@
(declare-function org-mark-ring-push "org.el")
(declare-function org-table-p "org-compat.el")
(declare-function org-table-align "org-table.el")
+(declare-function org-table-end "org-table.el")
(declare-function org-open-at-point "org.el")
(declare-function wdired-change-to-dired-mode "wdired.el")
(declare-function wdired-do-perm-changes "wdired.el")
@@ -648,14 +649,14 @@ displayed in BUFNAME."
(when helm-help-full-frame (delete-other-windows))
(delete-region (point-min) (point-max))
(org-mode)
- (org-mark-ring-push) ; Put mark at bob
(save-excursion
(funcall insert-content-fn)
(goto-char (point-min))
- (while (not (eobp))
- (forward-line 1)
+ (while (re-search-forward "^[|]" nil t)
(when (org-table-p t)
- (org-table-align))))
+ (org-table-align)
+ (goto-char (org-table-end)))))
+ (org-mark-ring-push) ; Put mark at bob
(buffer-disable-undo)
(helm-help-event-loop))
(raise-frame hframe)