mirror of
https://github.com/masscollaborationlabs/emacs.git
synced 2025-07-05 03:39:38 +00:00
* lisp/proced.el (proced-sort-header): Fix event positions (bug#1779).
The logic was copied from 'tabulated-list-col-sort'.
This commit is contained in:
parent
0dd3883def
commit
712898210f
1 changed files with 4 additions and 3 deletions
|
@ -1330,11 +1330,12 @@ It is converted to the corresponding attribute key.
|
||||||
This command updates the variable `proced-sort'.
|
This command updates the variable `proced-sort'.
|
||||||
Prefix ARG controls sort order, see `proced-sort-interactive'."
|
Prefix ARG controls sort order, see `proced-sort-interactive'."
|
||||||
(interactive (list last-input-event (or last-prefix-arg 'no-arg)))
|
(interactive (list last-input-event (or last-prefix-arg 'no-arg)))
|
||||||
(let ((start (event-start event))
|
(let* ((start (event-start event))
|
||||||
col key)
|
(obj (posn-object start))
|
||||||
|
col key)
|
||||||
(save-selected-window
|
(save-selected-window
|
||||||
(select-window (posn-window start))
|
(select-window (posn-window start))
|
||||||
(setq col (+ (1- (car (posn-actual-col-row start)))
|
(setq col (+ (if obj (cdr obj) (posn-point start))
|
||||||
(window-hscroll)))
|
(window-hscroll)))
|
||||||
(when (and (<= 0 col) (< col (length proced-header-line)))
|
(when (and (<= 0 col) (< col (length proced-header-line)))
|
||||||
(setq key (get-text-property col 'proced-key proced-header-line))
|
(setq key (get-text-property col 'proced-key proced-header-line))
|
||||||
|
|
Loading…
Add table
Add a link
Reference in a new issue