mirror of
https://codeberg.org/cage/tinmop/
synced 2024-12-14 22:54:02 +01:00
Compare commits
5 Commits
69ee5ab811
...
4f4fc1a181
Author | SHA1 | Date | |
---|---|---|---|
|
4f4fc1a181 | ||
|
d97bad8d3b | ||
|
d2b2605a89 | ||
|
e6cd7b9ab4 | ||
|
a0c25ee8fe |
10
doc/man.org
10
doc/man.org
@ -96,15 +96,13 @@
|
||||
- /C-k/ (that is: "press 'control' and while pressed press 'k')
|
||||
/kills/ (deletes) the text from the cursor position to the end of
|
||||
the input previously typed;
|
||||
- press /M-left/ and /M-right/ (left alt and left or right arrow
|
||||
together) to browse pages of the suggestion window; the
|
||||
suggestion window is a window that holds a previously inputted
|
||||
- press /M-left/ and /M-right/ (/left alt/ and /left/ or /right/
|
||||
arrow together) to browse pages of the suggestion window; the
|
||||
suggestion window is a window that holds a previously inputted
|
||||
data that are compatible with the string the user is typing into
|
||||
the command window;
|
||||
- if suggestions are gemini URI press /TAB/ to input the current
|
||||
selected suggestion (press tab again to input the next
|
||||
suggestion and so on), otherwise pressing /TAB/ will complete the
|
||||
input with the common prefix of the suggestion window's items;
|
||||
selected suggestion;
|
||||
- if suggestion window is *not* rendered, pressing /up/ and /down/
|
||||
arrow keys will cycle through input history, if there is not a
|
||||
suggestion window rendered pressing /up/ and /down/ will scroll
|
||||
|
@ -139,16 +139,14 @@ program;
|
||||
\fIkills\fP (deletes) the text from the cursor position to the end of
|
||||
the input previously typed;
|
||||
.IP \(em 4
|
||||
press \fIM-left\fP and \fIM-right\fP (left alt and left or right arrow
|
||||
together) to browse pages of the suggestion window; the
|
||||
suggestion window is a window that holds a previously inputted
|
||||
press \fIM-left\fP and \fIM-right\fP (\fIleft alt\fP and \fIleft\fP or \fIright\fP
|
||||
arrow together) to browse pages of the suggestion window; the
|
||||
suggestion window is a window that holds a previously inputted
|
||||
data that are compatible with the string the user is typing into
|
||||
the command window;
|
||||
.IP \(em 4
|
||||
if suggestions are gemini URI press \fITAB\fP to input the current
|
||||
selected suggestion (press tab again to input the next
|
||||
suggestion and so on), otherwise pressing \fITAB\fP will complete the
|
||||
input with the common prefix of the suggestion window's items;
|
||||
selected suggestion;
|
||||
.IP \(em 4
|
||||
if suggestion window is \fBnot\fP rendered, pressing \fIup\fP and \fIdown\fP
|
||||
arrow keys will cycle through input history, if there is not a
|
||||
|
@ -1,11 +1,11 @@
|
||||
# a line starting with a '#' is a comment
|
||||
# The server instance name
|
||||
# add this entry to your file (the one in your home)
|
||||
# server = test.server.org
|
||||
# server = test.server.org
|
||||
|
||||
# your username
|
||||
# add this entry to your file (the one in your home)
|
||||
# username = username
|
||||
# username = username
|
||||
|
||||
# theme
|
||||
|
||||
@ -13,33 +13,37 @@ use "default-theme.conf"
|
||||
|
||||
# maximum number of attachments allowed for a single toot
|
||||
# default is 4
|
||||
#max-numbers-allowed-attachments = 4
|
||||
#max-numbers-allowed-attachments = 4
|
||||
|
||||
# maximum number of characters allowed for a single toot
|
||||
# default is 500
|
||||
#max-message-length = 500
|
||||
#max-message-length = 500
|
||||
|
||||
# maximum number of characters allowed for reporting an user to
|
||||
# instance's admin
|
||||
#default is 100
|
||||
#max-report-comment-length = 100
|
||||
#max-report-comment-length = 100
|
||||
|
||||
# Character to use when replying to a message
|
||||
reply-quoted-character = "> "
|
||||
reply-quoted-character = "> "
|
||||
|
||||
# delete the command history entries that are older than this number
|
||||
# of days
|
||||
purge-history-days-offset = -30
|
||||
purge-history-days-offset = -30
|
||||
|
||||
# delete the cache entries that are older than this number of days
|
||||
purge-cache-days-offset = -7
|
||||
purge-cache-days-offset = -7
|
||||
|
||||
# chosen editor (as shell command line) for compose a message
|
||||
editor = "nano --locking"
|
||||
editor = "nano --locking"
|
||||
|
||||
# update gemlog subscriptions when program starts
|
||||
# (default 'no', change to 'yes' if desired)
|
||||
start.update.gemlog = no
|
||||
start.update.gemlog = no
|
||||
|
||||
# close links window when opening the selected link
|
||||
|
||||
open-message-link-window.close-after-select = yes
|
||||
|
||||
# color parts of a displayed message according to a regular expression
|
||||
# syntax is regular expression color attribute
|
||||
|
@ -336,12 +336,16 @@ be either `:keybinding' or `:string'. the former for key command the latter for
|
||||
command-line)
|
||||
(if candidates
|
||||
(if (null common-prefix)
|
||||
(insert-selected-suggestion object)
|
||||
(progn
|
||||
(insert-selected-suggestion object)
|
||||
(suggestions-window:update-suggestions suggestions-win
|
||||
command-line)
|
||||
(reset-selected-suggestion-index object)
|
||||
(setf (suggestions-window:current-page suggestions-win) 0))
|
||||
(progn
|
||||
(when (length= candidates 1)
|
||||
(win-hide suggestions-win))
|
||||
(setf command-line common-prefix)
|
||||
(move-point-to-end object command-line)))
|
||||
(insert-selected-suggestion object)))
|
||||
(win-hide suggestions-win))))
|
||||
object)
|
||||
|
||||
@ -421,25 +425,32 @@ be either `:keybinding' or `:string'. the former for key command the latter for
|
||||
(defun select-suggestion-previous (win)
|
||||
(select-suggestion win -1))
|
||||
|
||||
(defun insert-selected-suggestion (win)
|
||||
(with-accessors ((suggestions-win suggestions-win)
|
||||
(command-line command-line)) win
|
||||
(defun suggested-selection (win)
|
||||
(with-accessors ((suggestions-win suggestions-win)) win
|
||||
(when suggestions-win
|
||||
(with-accessors ((current-page suggestions-window:current-page)
|
||||
(paginated-info suggestions-window:paginated-info)
|
||||
(selected-item-row-index complete-window::selected-item-row-index)
|
||||
(selected-item-column-index complete-window::selected-item-column-index))
|
||||
suggestions-win
|
||||
(let* ((columns (elt paginated-info current-page))
|
||||
(column (elt columns selected-item-column-index))
|
||||
(suggestion (trim-blanks (elt column selected-item-row-index))))
|
||||
(if (string= command-line suggestion)
|
||||
(progn
|
||||
(select-suggestion-next win)
|
||||
(insert-selected-suggestion win))
|
||||
(progn
|
||||
(setf command-line suggestion)
|
||||
(move-point-to-end win command-line))))))))
|
||||
(when-let* ((columns (elt paginated-info current-page))
|
||||
(column (elt columns selected-item-column-index))
|
||||
(suggestion (trim-blanks (elt column selected-item-row-index))))
|
||||
suggestion)))))
|
||||
|
||||
(defun reset-selected-suggestion-index (win)
|
||||
(with-accessors ((suggestions-win suggestions-win)) win
|
||||
(complete-window:reset-selected-item suggestions-win))
|
||||
win)
|
||||
|
||||
(defun insert-selected-suggestion (win)
|
||||
(with-accessors ((suggestions-win suggestions-win)
|
||||
(command-line command-line)) win
|
||||
(when suggestions-win
|
||||
(let ((suggestion (suggested-selection win)))
|
||||
(setf command-line suggestion)
|
||||
(move-point-to-end win command-line))))
|
||||
win)
|
||||
|
||||
(defun fire-user-input-event (win)
|
||||
"Generates an event to notify that the user inserted an input on the
|
||||
|
@ -224,7 +224,8 @@
|
||||
(select-row object 0))
|
||||
|
||||
(defun adjust-rows-select-first (window)
|
||||
(select-first-row window))
|
||||
(when (rows window)
|
||||
(select-first-row window)))
|
||||
|
||||
(defun adjust-rows-select-last (window)
|
||||
(with-accessors ((rows rows)) window
|
||||
|
@ -75,6 +75,9 @@
|
||||
(let* ((parsed (iri:iri-parse url))
|
||||
(scheme (uri:scheme parsed))
|
||||
(decoded-path (percent-decode url)))
|
||||
(when (and (not enqueue)
|
||||
(swconf:close-link-window-after-select-p))
|
||||
(ui:close-open-message-link-window))
|
||||
(cond
|
||||
((string= gemini-constants:+gemini-scheme+ scheme)
|
||||
(db:insert-in-history (ui:gemini-open-url-prompt) url)
|
||||
|
@ -1113,6 +1113,7 @@
|
||||
:load-config-file
|
||||
:external-editor
|
||||
:gemini-downloading-animation
|
||||
:close-link-window-after-select-p
|
||||
:suggestion-window-selected-item-colors
|
||||
:gemini-default-favicon
|
||||
:gemini-update-gemlog-at-start-p
|
||||
|
@ -1143,6 +1143,8 @@
|
||||
(progn
|
||||
(setf (gemini-viewer:gemini-metadata-source-file window-metadata) source)
|
||||
(setf (gemini-viewer:gemini-metadata-links window-metadata) links)
|
||||
(funcall (message-window:adjust-rows-strategy win)
|
||||
win)
|
||||
(line-oriented-window:update-all-rows win new-rows)))))))
|
||||
|
||||
(defmethod process-event ((object gemini-got-line-event))
|
||||
|
@ -527,6 +527,7 @@
|
||||
directory-symbol
|
||||
fetch
|
||||
update
|
||||
close-after-select
|
||||
password-echo-character
|
||||
color-re
|
||||
ignore-user-re
|
||||
@ -595,6 +596,12 @@
|
||||
(access-key->user-directive keys))))
|
||||
value)))
|
||||
|
||||
(defun close-link-window-after-select-p ()
|
||||
(let ((value (access:accesses *software-configuration*
|
||||
+key-open-message-link-window+
|
||||
+key-close-after-select+)))
|
||||
(not (false-value-p value))))
|
||||
|
||||
(defun suggestion-window-selected-item-colors ()
|
||||
(values (access-non-null-conf-value *software-configuration*
|
||||
+key-suggestions-window+
|
||||
|
@ -24,7 +24,7 @@
|
||||
|
||||
(defrule range-delimter #\-)
|
||||
|
||||
(defrule list-delimiter #\Space)
|
||||
(defrule list-delimiter (+ (or #\Space #\,)))
|
||||
|
||||
(defrule number (and digit (* digit))
|
||||
(:text t)
|
||||
|
Loading…
Reference in New Issue
Block a user