1
0
mirror of https://codeberg.org/cage/tinmop/ synced 2024-12-14 22:54:02 +01:00

Compare commits

..

3 Commits

Author SHA1 Message Date
cage
b658e1024b - suppressed printing of three notes. 2021-07-25 13:27:54 +02:00
cage
e66c86c17d - revert to old completion method for non URI;
- added type declaration to remove optimization note.
2021-07-25 12:44:35 +02:00
cage
c242a3d5ea - updated changelog and shared.conf. 2021-07-25 12:20:17 +02:00
7 changed files with 141 additions and 16 deletions

107
ChangeLog
View File

@ -1,3 +1,110 @@
2021-07-23 cage
* src/command-window.lisp,
* src/complete-window.lisp,
* src/complete.lisp,
* src/conditions.lisp,
* src/gemini/client.lisp,
* src/package.lisp,
* src/text-utils.lisp:
- implemented cut line from point (using "^K") in command window;
- fixed typo;
- [gemini] added moving selected uri from suggestion window using
Tab key;
- resetted selected item position when a 'suggestion-window' is
shown;
- changed the way the input is completed, complete with current
selected item in suggestion window;
- [gemini] used fuzzy matching when looking for URI in history.
2021-07-22 cage
* etc/default-theme.conf,
* etc/default-theme.conf,
* etc/init.lisp,
* etc/init.lisp,
* src/command-window.lisp,
* src/complete-window.lisp,
* src/complete-window.lisp,
* src/complete.lisp,
* src/message-window.lisp,
* src/package.lisp,
* src/software-configuration.lisp,
* src/tests/text-utils-tests.lisp,
* src/text-utils.lisp,
* src/tui-utils.lisp:
- removed empty lines;
- [gemini] changed streaming animation;
- [gemini] allowed open gemini links from gemlog subscription
window;
- highlighted a mit more matched characters in 'suggestion-window';
- fixed padding when fitting suggestions into 'suggestion-win'.
- allowed selecting a suggestion from suggestion-window; -
highlighted matching characters in suggestion window.
2021-07-17 cage
* etc/default-theme.conf,
* etc/shared.conf,
* modules/rewrite-message-urls.lisp,
* src/gemini/client.lisp,
* src/gemini/gemini-parser.lisp,
* src/gemini/package.lisp,
* src/message-window.lisp,
* src/package.lisp,
* src/software-configuration.lisp,
* src/tui-utils.lisp:
- [gemini] removed link prefix for link labels that starts with an
emoji;
- [gemini] removed splitting of long link labels; - fixed output
stream of 'print-debug'.
2021-07-16 cage
* src/db.lisp,
* src/emoji-matcher.lisp,
* src/gemini/client.lisp,
* src/gemini/gemini-parser.lisp,
* src/gemini/package.lisp,
* src/package.lisp:
- [gemini fixed validity check for client certificate (thanks op!);
- removed link prefix if link line starts with an emoji.
2021-07-15 cage
* etc/init.lisp,
* src/emoji-matcher.lisp,
* src/gemini-viewer.lisp,
* src/package.lisp,
* src/program-events.lisp,
* LICENSES.org;
- [gemini] fixed missing rendering of search query results.
- made clear source and license of the emojis;
- fixed docstring (thanks op!);
- prevented a crash when refresh of chats hits a network error.
- added 'emojip'.
- added 'starts-with-emoji-p'.
- renamed 'starts-with-emoji-p' to 'starting-emoji'.
2021-07-14 cage
* etc/default-theme.conf,
* src/9p-client/client.lisp,
* src/message-window.lisp,
* src/package.lisp,
* src/program-events.lisp,
* src/software-configuration.lisp:
- [gemini] added a visual hint while a gemini page is streaming contents;
- [9p] changed default for opening to 'read';
- [9p] added an example using 'stat'.
2021-07-10 cage
* src/program-events.lisp,

View File

@ -149,7 +149,7 @@ color-regexp = ":rendering" cyan
# ignore-user-regexp = "^user-name@domain-name"
# Use gemini favicon?
# see gemini://mozz.us/files/rfc_gemini_favicon.gm
# see gemini://mozz.us/files/rfc_gemini_favicon.gmi
# gemini.fetch.favicon = no
# you can instruct the program to open some non gemini link with a
@ -158,17 +158,20 @@ color-regexp = ":rendering" cyan
# example:
#
# open "https?://.+mp3" with "mpv"
#
# you can open mpv in a new terminal this way:
#
# open "https?://.+mp3" with "xterm -e mpv"
#
# open "mp3$" with "xterm -e mpv"
# open "m3u8$" with "xterm -e mpv"
# open "ogg$" with "xterm -e mpv"
# open png files with gimp but cache them before
# ▼▼▼▼▼▼▼▼▼
# open "https?://png$" with "gimp" use cache
# if you want to open some kind of file with tinmop try the following
# valid values are "tinmop" "me" "internal"
# ▼▼▼▼▼▼▼▼
# ▼▼▼▼▼▼▼▼
open "^((gemini://)|(\\.)|(/)).+gmi$" with "tinmop"
open "^((gemini://)|(\\.)|(/)).+txt$" with "tinmop"
open "^((gemini://)|(\\.)|(/)).+sh$" with "tinmop"

View File

@ -335,13 +335,13 @@ be either `:keybinding' or `:string'. the former for key command the latter for
(suggestions-window:update-suggestions suggestions-win
command-line)
(if candidates
(progn
(when (length= candidates 1)
(win-hide suggestions-win))
(if common-prefix
(if (null common-prefix)
(insert-selected-suggestion object)
(progn
(when (length= candidates 1)
(win-hide suggestions-win))
(setf command-line common-prefix)
(setf command-line (complete:shortest-candidate candidates)))
(move-point-to-end object command-line))
(move-point-to-end object command-line)))
(win-hide suggestions-win))))
object)
@ -520,7 +520,7 @@ command line."
(move-point-to-start command-window)
(set-keybinding-mode command-window))
((char= #\Tab event)
(insert-selected-suggestion command-window))
(complete-at-point command-window))
(t
(if (null suggestions-win)
(setf suggestions-win (complete-window:init))

View File

@ -239,7 +239,14 @@ list af all possible candidtae for completion."
(uri-matcher hint bag)
(when matched-strings
(values matched-strings
(reduce-to-common-prefix matched-strings)
nil ;for fuzzy search common prefix does
;not makes sense; note also that
;setting this to nil will force
;selecting the first item in
;'complete-window' (see:
;complete-at-point and
;insert-selected-suggestion),
indices))))))
(defun complete-chat-message (hint)

View File

@ -16,6 +16,12 @@
(in-package :constants)
(defun actual-program-name ()
(declare (sb-ext:muffle-conditions sb-ext:compiler-note))
(if (string= +program-name+ "tinmop")
"tinmop"
(format nil "~a (original name: \"tinmop\")" +program-name+)))
(define-constant +help-about-message+
(format nil
"~a
@ -37,7 +43,7 @@ along with this program.
For bug report please point your browser to:
~a"
+program-name+
(actual-program-name)
+issue-tracker+)
:test #'string=)
@ -72,9 +78,7 @@ This program is distributed in the hope that it will be useful, but
WITHOUT ANY WARRANTY; without even the implied warranty of
MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
General Public License for more details."
(if (string= +program-name+ "tinmop")
"tinmop"
(format nil "~a (original name: \"tinmop\")" +program-name+))
(actual-program-name)
+issue-tracker+)
:test #'string=)

View File

@ -467,6 +467,8 @@
(when (downloading-allowed-p wrapper-object)
(multiple-value-bind (buffer read-so-far)
(read-array download-stream +read-buffer-size+)
(declare ((vector (unsigned-byte 8)) buffer))
(declare (fixnum read-so-far))
(increment-bytes-count wrapper-object read-so-far)
(if (< read-so-far (length buffer))
(progn

View File

@ -77,8 +77,10 @@
(defun parse-subwin-w (w-as-string)
"Parse a window width, `w-as-string' a fraction of the main window width"
(declare (sb-ext:muffle-conditions sb-ext:compiler-note))
(parse-subwin-size w-as-string (win-width *main-window*)))
(defun parse-subwin-h (h-as-string)
"Parse a window height, `h-as-string' a fraction of the main window height"
(declare (sb-ext:muffle-conditions sb-ext:compiler-note))
(parse-subwin-size h-as-string (win-height *main-window*)))