update packages
This commit is contained in:
@@ -79,7 +79,7 @@ emacs_value symbol_value(emacs_env *env, emacs_value symbol) {
|
||||
return env->funcall(env, Fsymbol_value, 1, (emacs_value[]){symbol});
|
||||
}
|
||||
|
||||
int string_bytes(emacs_env *env, emacs_value string) {
|
||||
ptrdiff_t string_bytes(emacs_env *env, emacs_value string) {
|
||||
ptrdiff_t size = 0;
|
||||
env->copy_string_contents(env, string, NULL, &size);
|
||||
return size;
|
||||
|
||||
@@ -65,7 +65,7 @@ extern emacs_value Fvterm_set_selection;
|
||||
void bind_function(emacs_env *env, const char *name, emacs_value Sfun);
|
||||
void provide(emacs_env *env, const char *feature);
|
||||
emacs_value symbol_value(emacs_env *env, emacs_value symbol);
|
||||
int string_bytes(emacs_env *env, emacs_value string);
|
||||
ptrdiff_t string_bytes(emacs_env *env, emacs_value string);
|
||||
emacs_value length(emacs_env *env, emacs_value string);
|
||||
emacs_value list(emacs_env *env, emacs_value elements[], ptrdiff_t len);
|
||||
emacs_value nth(emacs_env *env, int idx, emacs_value list);
|
||||
|
||||
@@ -209,8 +209,11 @@ static void fetch_cell(Term *term, int row, int col, VTermScreenCell *cell) {
|
||||
static char *get_row_directory(Term *term, int row) {
|
||||
if (row < 0) {
|
||||
ScrollbackLine *sbrow = term->sb_buffer[-row - 1];
|
||||
return sbrow->info->directory;
|
||||
/* return term->dirs[0]; */
|
||||
if ( sbrow && sbrow->info && sbrow->info->directory ) {
|
||||
return sbrow->info->directory;
|
||||
} else {
|
||||
return NULL;
|
||||
}
|
||||
} else {
|
||||
LineInfo *line = term->lines[row];
|
||||
return line ? line->directory : NULL;
|
||||
@@ -421,7 +424,7 @@ static int term_resize(int rows, int cols, void *user_data) {
|
||||
/* if rows=term->lines_len, that means term_sb_pop already resize term->lines
|
||||
*/
|
||||
/* if rows<term->lines_len, term_sb_push would resize term->lines there */
|
||||
/* we noly need to take care of rows>term->height */
|
||||
/* we only need to take care of rows>term->height */
|
||||
|
||||
if (rows > term->height) {
|
||||
if (rows > term->lines_len) {
|
||||
@@ -485,8 +488,8 @@ static void refresh_scrollback(Term *term, emacs_env *env) {
|
||||
|
||||
term->linenum += term->sb_pending;
|
||||
del_cnt = term->linenum - max_line_count; /* extra lines at the bottom */
|
||||
/* buf_index is negative,so we move to end of buffer,then backward
|
||||
-buf_index lines. goto lines backward is effectively when
|
||||
/* buf_index is negative, so we move to end of buffer, then backward
|
||||
-buf_index lines. goto lines backward is effective when
|
||||
vterm-max-scrollback is a large number.
|
||||
*/
|
||||
int buf_index = -(term->height + del_cnt);
|
||||
@@ -500,7 +503,7 @@ static void refresh_scrollback(Term *term, emacs_env *env) {
|
||||
del_cnt = term->linenum - max_line_count;
|
||||
if (del_cnt > 0) {
|
||||
term->linenum -= del_cnt;
|
||||
/* -del_cnt is negative,so we delete_lines from end of buffer.
|
||||
/* -del_cnt is negative, so we delete_lines from end of buffer.
|
||||
this line means: delete del_cnt count of lines at end of buffer.
|
||||
*/
|
||||
delete_lines(env, -del_cnt, del_cnt, true);
|
||||
@@ -515,7 +518,7 @@ static void adjust_topline(Term *term, emacs_env *env) {
|
||||
VTermPos pos;
|
||||
vterm_state_get_cursorpos(state, &pos);
|
||||
|
||||
/* pos.row-term->height is negative,so we backward term->height-pos.row
|
||||
/* pos.row-term->height is negative, so we backward term->height-pos.row
|
||||
* lines from end of buffer
|
||||
*/
|
||||
|
||||
@@ -1230,7 +1233,7 @@ emacs_value Fvterm_new(emacs_env *env, ptrdiff_t nargs, emacs_value args[],
|
||||
int disable_underline = env->is_not_nil(env, args[4]);
|
||||
int disable_inverse_video = env->is_not_nil(env, args[5]);
|
||||
int ignore_blink_cursor = env->is_not_nil(env, args[6]);
|
||||
int set_bold_hightbright = env->is_not_nil(env, args[7]);
|
||||
int set_bold_highbright = env->is_not_nil(env, args[7]);
|
||||
|
||||
term->vt = vterm_new(rows, cols);
|
||||
vterm_set_utf8(term->vt, 1);
|
||||
@@ -1244,7 +1247,7 @@ emacs_value Fvterm_new(emacs_env *env, ptrdiff_t nargs, emacs_value args[],
|
||||
vterm_state_set_selection_callbacks(state, &selection_callbacks, term,
|
||||
term->selection_buf, SELECTION_BUF_LEN);
|
||||
#endif
|
||||
vterm_state_set_bold_highbright(state, set_bold_hightbright);
|
||||
vterm_state_set_bold_highbright(state, set_bold_highbright);
|
||||
|
||||
vterm_screen_reset(term->vts, 1);
|
||||
vterm_screen_set_callbacks(term->vts, &vterm_screen_callbacks, term);
|
||||
|
||||
@@ -1,10 +1,10 @@
|
||||
;; -*- no-byte-compile: t; lexical-binding: nil -*-
|
||||
(define-package "vterm" "20241218.331"
|
||||
(define-package "vterm" "20251119.1653"
|
||||
"Fully-featured terminal emulator."
|
||||
'((emacs "25.1"))
|
||||
:url "https://github.com/akermu/emacs-libvterm"
|
||||
:commit "f64729ed8b59e46ce827d28222c4087c538de562"
|
||||
:revdesc "f64729ed8b59"
|
||||
:commit "a01a2894a1c1e81a39527835a9169e35b7ec5dec"
|
||||
:revdesc "a01a2894a1c1"
|
||||
:keywords '("terminals")
|
||||
:authors '(("Lukas Fürmetz" . "fuermetz@mailbox.org"))
|
||||
:maintainers '(("Lukas Fürmetz" . "fuermetz@mailbox.org")))
|
||||
|
||||
@@ -3,8 +3,8 @@
|
||||
;; Copyright (C) 2017-2020 by Lukas Fürmetz & Contributors
|
||||
;;
|
||||
;; Author: Lukas Fürmetz <fuermetz@mailbox.org>
|
||||
;; Package-Version: 20241218.331
|
||||
;; Package-Revision: f64729ed8b59
|
||||
;; Package-Version: 20251119.1653
|
||||
;; Package-Revision: a01a2894a1c1
|
||||
;; URL: https://github.com/akermu/emacs-libvterm
|
||||
;; Keywords: terminals
|
||||
;; Package-Requires: ((emacs "25.1"))
|
||||
@@ -44,7 +44,7 @@
|
||||
;; emacs-libvterm will downloaded and compiled. In this case, libtool is
|
||||
;; needed.
|
||||
|
||||
;; The reccomended way to install emacs-libvterm is from MELPA.
|
||||
;; The recommended way to install emacs-libvterm is from MELPA.
|
||||
|
||||
;;; Usage
|
||||
|
||||
@@ -384,11 +384,14 @@ This means that vterm will render bold with the default face weight."
|
||||
:type 'boolean
|
||||
:group 'vterm)
|
||||
|
||||
(defcustom vterm-set-bold-hightbright nil
|
||||
"When not-nil, using hightbright colors for bolded text, see #549."
|
||||
(defcustom vterm-set-bold-highbright nil
|
||||
"When not-nil, using highbright colors for bolded text, see #549."
|
||||
:type 'boolean
|
||||
:group 'vterm)
|
||||
|
||||
(define-obsolete-variable-alias 'vterm-set-bold-hightbright
|
||||
'vterm-set-bold-highbright "0.0.2")
|
||||
|
||||
(defcustom vterm-ignore-blink-cursor t
|
||||
"When t, vterm will ignore request from application to turn on/off cursor blink.
|
||||
|
||||
@@ -430,7 +433,7 @@ not require any shell-side configuration. See
|
||||
|
||||
vterm inserts \\='fake\\=' newlines purely for rendering. When using
|
||||
vterm-copy-mode these are in conflict with many emacs functions
|
||||
like isearch-forward. if this varialbe is not-nil the
|
||||
like isearch-forward. if this variable is not-nil the
|
||||
fake-newlines are removed on entering copy-mode and re-inserted
|
||||
on leaving copy mode. Also truncate-lines is set to t on entering
|
||||
copy-mode and set to nil on leaving."
|
||||
@@ -575,7 +578,7 @@ Only background is used."
|
||||
"Shell process of current term.")
|
||||
|
||||
(defvar-local vterm--redraw-timer nil)
|
||||
(defvar-local vterm--redraw-immididately nil)
|
||||
(defvar-local vterm--redraw-immediately nil)
|
||||
(defvar-local vterm--linenum-remapping nil)
|
||||
(defvar-local vterm--prompt-tracking-enabled-p nil)
|
||||
(defvar-local vterm--insert-function (symbol-function #'insert))
|
||||
@@ -584,6 +587,7 @@ Only background is used."
|
||||
(defvar-local vterm--undecoded-bytes nil)
|
||||
(defvar-local vterm--copy-mode-fake-newlines nil)
|
||||
|
||||
(define-obsolete-variable-alias 'vterm--redraw-immididately 'vterm--redraw-immediately "2025-07-15")
|
||||
|
||||
(defvar vterm-timer-delay 0.1
|
||||
"Delay for refreshing the buffer after receiving updates from libvterm.
|
||||
@@ -775,7 +779,7 @@ Exceptions are defined by `vterm-keymap-exceptions'."
|
||||
vterm-disable-underline
|
||||
vterm-disable-inverse-video
|
||||
vterm-ignore-blink-cursor
|
||||
vterm-set-bold-hightbright))
|
||||
vterm-set-bold-highbright))
|
||||
(setq buffer-read-only t)
|
||||
(setq-local scroll-conservatively 101)
|
||||
(setq-local scroll-margin 0)
|
||||
@@ -995,7 +999,7 @@ additional output received from the underlying process and will
|
||||
behave similarly to buffer in `fundamental-mode'. This mode is
|
||||
typically used to copy text from vterm buffers.
|
||||
|
||||
A conventient way to exit `vterm-copy-mode' is with
|
||||
A convenient way to exit `vterm-copy-mode' is with
|
||||
`vterm-copy-mode-done', which copies the selected text and exit
|
||||
`vterm-copy-mode'."
|
||||
:group 'vterm
|
||||
@@ -1056,7 +1060,7 @@ will invert `vterm-copy-exclude-prompt' for that call."
|
||||
(let ((inhibit-redisplay t)
|
||||
(inhibit-read-only t))
|
||||
(vterm--update vterm--term key shift meta ctrl)
|
||||
(setq vterm--redraw-immididately t)
|
||||
(setq vterm--redraw-immediately t)
|
||||
(when accept-proc-output
|
||||
(accept-process-output vterm--process vterm-timer-delay nil t)))))
|
||||
|
||||
@@ -1257,7 +1261,7 @@ Optional argument PASTE-P paste-p."
|
||||
(vterm--update vterm--term (char-to-string char)))
|
||||
(when paste-p
|
||||
(vterm--update vterm--term "<end_paste>")))
|
||||
(setq vterm--redraw-immididately t)
|
||||
(setq vterm--redraw-immediately t)
|
||||
(accept-process-output vterm--process vterm-timer-delay nil t))
|
||||
|
||||
(defun vterm-insert (&rest contents)
|
||||
@@ -1272,11 +1276,11 @@ Provide similar behavior as `insert' for vterm."
|
||||
(dolist (char (string-to-list c))
|
||||
(vterm--update vterm--term (char-to-string char)))))
|
||||
(vterm--update vterm--term "<end_paste>")
|
||||
(setq vterm--redraw-immididately t)
|
||||
(setq vterm--redraw-immediately t)
|
||||
(accept-process-output vterm--process vterm-timer-delay nil t)))
|
||||
|
||||
(defun vterm-delete-region (start end)
|
||||
"Delete the text between START and END for vterm. "
|
||||
"Delete the text between START and END for vterm."
|
||||
(when vterm--term
|
||||
(save-excursion
|
||||
(when (get-text-property start 'vterm-line-wrap)
|
||||
@@ -1314,9 +1318,9 @@ The return value is `t' when point moved successfully."
|
||||
;;; Internal
|
||||
|
||||
(defun vterm--forward-char ()
|
||||
"Move point 1 character forward ().
|
||||
"Move point 1 character forward.
|
||||
|
||||
the return value is `t' when cursor moved."
|
||||
The return value is `t' when cursor moved."
|
||||
(vterm-reset-cursor-point)
|
||||
(let ((pt (point)))
|
||||
(vterm-send-key "<right>" nil nil nil t)
|
||||
@@ -1340,7 +1344,7 @@ the return value is `t' when cursor moved."
|
||||
(defun vterm--backward-char ()
|
||||
"Move point N characters backward.
|
||||
|
||||
Return count of moved characeters."
|
||||
Return count of moved characters."
|
||||
(vterm-reset-cursor-point)
|
||||
(let ((pt (point)))
|
||||
(vterm-send-key "<left>" nil nil nil t)
|
||||
@@ -1399,14 +1403,14 @@ looks like: ((\"m\" :shift ))"
|
||||
|
||||
(defun vterm--invalidate ()
|
||||
"The terminal buffer is invalidated, the buffer needs redrawing."
|
||||
(if (and (not vterm--redraw-immididately)
|
||||
(if (and (not vterm--redraw-immediately)
|
||||
vterm-timer-delay)
|
||||
(unless vterm--redraw-timer
|
||||
(setq vterm--redraw-timer
|
||||
(run-with-timer vterm-timer-delay nil
|
||||
#'vterm--delayed-redraw (current-buffer))))
|
||||
(vterm--delayed-redraw (current-buffer))
|
||||
(setq vterm--redraw-immididately nil)))
|
||||
(setq vterm--redraw-immediately nil)))
|
||||
|
||||
(defun vterm-check-proc (&optional buffer)
|
||||
"Check if there is a running process associated to the vterm buffer BUFFER.
|
||||
@@ -1815,7 +1819,7 @@ in README."
|
||||
|
||||
(defun vterm--get-beginning-of-line (&optional pt)
|
||||
"Find the start of the line, bypassing line wraps.
|
||||
If PT is specified, find it's beginning of the line instead of the beginning
|
||||
If PT is specified, find its beginning of the line instead of the beginning
|
||||
of the line at cursor."
|
||||
(save-excursion
|
||||
(when pt (goto-char pt))
|
||||
@@ -1827,8 +1831,8 @@ of the line at cursor."
|
||||
(point)))
|
||||
|
||||
(defun vterm--get-end-of-line (&optional pt)
|
||||
"Find the start of the line, bypassing line wraps.
|
||||
If PT is specified, find it's end of the line instead of the end
|
||||
"Find the end of the line, bypassing line wraps.
|
||||
If PT is specified, find its end of the line instead of the end
|
||||
of the line at cursor."
|
||||
(save-excursion
|
||||
(when pt (goto-char pt))
|
||||
@@ -1863,7 +1867,7 @@ More information see `vterm--prompt-tracking-enabled-p' and
|
||||
(= (point) (or (vterm--get-prompt-point) 0)))
|
||||
|
||||
(defun vterm-cursor-in-command-buffer-p (&optional pt)
|
||||
"Check whether cursor in command buffer area."
|
||||
"Check whether cursor is in command buffer area."
|
||||
(save-excursion
|
||||
(vterm-reset-cursor-point)
|
||||
(let ((promp-pt (vterm--get-prompt-point)))
|
||||
|
||||
Reference in New Issue
Block a user