Commit graph

3335 commits

Author SHA1 Message Date
Gold Holk
9e5092a246 Docs for new find options and implement the jump-to option
There is a `-:` option in the docs of `find`, but it is not implemented.
This commit implement it.
The new docs of `--search-from-view` and `--reverse` are added, too.
2022-09-02 22:29:18 +08:00
gholk
d5173c0773 Replace minimist with arg for permissive feature
The npm package arg is more flexible than the old arguments parser minimist.
The arg can left the unknown option unchanged,
(while there is a bug that splits the unknown short options,)
and stop at positional arguments are supported, too.
2022-09-01 23:23:16 +08:00
gholk
b4ebaf5186 Fix the findnext behavior after find -?
This commit should make the findnext whit negative argument work fine,
and all combination of [reverse, negative] is take cared.
This may change the original behavior of find, because the original
implementation is buggy.

The `findnext -r` is renamed to `findnext -?` to follow the style of `find -?`.
2022-08-26 22:20:50 +08:00
gholk
8e3d023cde Add reverse option for findnext for better reverse finding
With the reverse option, we can do inverse findnext with number prefix.
This commit also import minimist as arguments parsing library.
2022-08-24 22:07:58 +08:00
gholk
090858e16b Make excmd findnext support search from viewport
To search from view with ex command findnext,
pass the `-r` or the `--search-from-view` option.
2022-08-24 21:17:42 +08:00
gholk
fb2173871f Allow finding.jumpToNextMatch find from the current viewport
Add option to find from the current viewport,
and add isVisible method to FindHighlight.
The reverse finding is not cover now.
2022-08-23 21:42:33 +08:00
Gold Holk
1d7795f40a Add recursive expansion to searchurls and jsurls
Therefore we can have alias in searchurls and jsurls just like alias
2022-08-22 20:43:49 +08:00
gholk
a403999cdc Fix the DOM.isVisible for finding highlight element
The highlight element's position is set to `top: 0; left: 0;`,
so it will never be visible. We should test its child nodes instead.
2022-08-18 20:33:55 +08:00
Gold Holk
b81c9dcdb7 Add fuse search in undo and fix undo session id is undefind
Allow fuse search with url in undo completion.
Fix undo access undefined value in session,
though I don't see anyone cares the return value of undo.
2022-08-11 22:16:21 +08:00
Gold Holk
1015f540d1
Fix wrong empty selection detect
The anchorOffset and the focusOffset are counted from the anchorNode and the focusNode.
They may be different node, so a same offset does not mean empty selection.
Just isCollapsed is enough.
2022-08-10 11:18:32 +08:00
gholk
c90482042e Fix timestamp in completion of back command for shydactyl
The completion for back/forward can show the history list.
The item contain title, url and timestamp,
but timestamp does not show up in shydactyl theme,
because the `.url` and `.title` both takes `width: 50%;`,
so no space is left for the timestamp.

This commit remove the `.title`'s width contrain,
so the title will adjust its width automatically.
Also style `.time` to appropriate width and align right.
2022-08-03 19:43:53 +08:00
gholk
649d2009e8 Add documentation for most autocmd events
Add details for DocStart, DocLoad, DocEnd, TabEnter, TabLeft,
HistoryState, HistoryPushState and HistoryReplace in
autocmd's JSDoc, and correct HistoryPopState to HistoryPushState.
2022-07-25 22:29:52 +08:00
Oliver Blanthorn
92e143cfb8
Merge pull request #4284 from davidscotson/forced-color-mode
Fix #4283 to improve forced-color support
2022-06-30 22:11:21 +02:00
gholk
63b239cb36 Fix previous commit subconfig prefix bug
without shift, mktridactyl will generate
seturl with subconfig keypath.
this commit removes it.
2022-06-26 14:45:52 +08:00
gholk
82ed8447b1 Fix #4285: mktridactyl output wrong seturl command
If there are more than one seturl/bindurl config
in one url, `mktridactylrc` will outputs wrong
seturl/bindurl commands, which become global settings.

Because `prefix.shift()` will mutate the array.
Then in the next iteration, the subconfig and url in prefix
will miss.
2022-06-25 22:05:54 +08:00
David Scotson
483d57b9e9 Fix #4283 to improve forced-color support 2022-06-22 21:03:43 +01:00
Oliver Blanthorn
01a5cbfba7
Fix #4275: add 12 more browser bind slots 2022-06-19 15:26:49 +02:00
Oliver Blanthorn
fd1674a000
Fix #4259: add --focus-address-bar flag to tabopen 2022-06-14 13:37:00 +02:00
Oliver Blanthorn
0834fa1744
Expose completion providers for gholk 2022-06-02 15:37:34 +02:00
Oliver Blanthorn
799d3d231c
Merge pull request #4176 from tridactyl/force_space
Make ctrl-space insert a space in command line
2022-05-29 11:15:34 +01:00
Oliver Blanthorn
a8b30e8068
Rebind insert a space to ctrl+space
This means we're no longer blocked by #4175
2022-05-26 13:44:40 +02:00
Oliver Blanthorn
fbfbe403c2
WIP: bind ex.insert_space to S-Space
Bug: this is currently shadowed by the <Space> bind
2022-05-26 13:43:16 +02:00
Oliver Blanthorn
806698bd05
Add ex.insert_space to simulate spacebar 2022-05-26 13:43:15 +02:00
Oliver Blanthorn
f52bfb0ce4
Cheer up prettier 2022-05-26 13:42:10 +02:00
Oliver Blanthorn
beb2ea3b25
Fix #3899: remove duplicate fields 2022-05-24 17:05:33 +02:00
Oliver Blanthorn
ed7b6fb0cd
Merge pull request #2927 from mariuszdb/local-and-global-marks
Local and global marks
2022-05-24 14:31:39 +01:00
Oliver Blanthorn
8bb519c774
Merge pull request #2359 from noctuid/feature/tab-groups
WIP Tab groups
2022-05-24 14:31:18 +01:00
Oliver Blanthorn
f110647137
Cheer up eslint - manual fixes 2022-05-24 14:36:16 +02:00
Oliver Blanthorn
4092e04f7d
Cheer up eslint 2022-05-24 14:31:16 +02:00
Oliver Blanthorn
84dfdf49cf
Improve tgroupcreate docs 2022-05-24 14:26:13 +02:00
Oliver Blanthorn
ba55f59153
Merge branch 'master' into feature/tab-groups 2022-05-24 14:24:00 +02:00
Oliver Blanthorn
a5ee7f6c00
Restore incognito check before storage 2022-05-24 14:19:34 +02:00
Oliver Blanthorn
1fee6c5459
Add HistoryState autocmd event
For most usecases this should replace UriChange
2022-05-24 14:03:55 +02:00
Oliver Blanthorn
c91583bfcd
Rename locationchange to HistoryState 2022-05-24 14:03:18 +02:00
Oliver Blanthorn
92cf67ab07
Cheer up eslint 2022-05-24 12:39:04 +02:00
Oliver Blanthorn
905db67c99
Merge branch 'master' into ivcz/master 2022-05-24 12:02:55 +02:00
Oliver Blanthorn
9b988e66a6
Merge pull request #4112 from tridactyl/dependabot/npm_and_yarn/eslint-plugin-sonarjs-0.12.0
Bump eslint-plugin-sonarjs from 0.7.0 to 0.12.0
2022-05-24 10:59:13 +01:00
Oliver Blanthorn
0e0a1bcdf5
Add support for SPAs 2022-05-15 16:14:51 +02:00
Oliver Blanthorn
0a62328198
Merge branch 'urichangev2' into ivcz/master 2022-05-15 16:01:12 +02:00
Oliver Blanthorn
5a738563b3
Make most recent tab usually appear at top 2022-05-15 15:58:39 +02:00
Oliver Blanthorn
b4ba80bd13
Bikeshed formatting 2022-05-15 15:58:14 +02:00
Oliver Blanthorn
d55b1b7980
Give time its own column 2022-05-15 15:32:56 +02:00
Oliver Blanthorn
300b8c0e7e
Fix a couple of little bugs 2022-05-15 15:31:24 +02:00
Oliver Blanthorn
597ad6320b
Remove padding
It looked a little strange since we have e.g. days, so the numbers never lined up anyway
2022-05-15 15:05:41 +02:00
Oliver Blanthorn
a6005bb80d
Make days etc. plural where needed 2022-05-15 15:02:46 +02:00
gholk
7344c42e3a
Add timestamp and show in human readable format
Use current time for the timestamp which may not
be same as timestamp in firefox's history.
A handcraft implementation to format human readable timespan.
2022-05-15 14:52:12 +02:00
Oliver Blanthorn
0eeaf15b06
Fix #4231: link to EsmaeilSaleh's Memrise course 2022-05-15 14:49:55 +02:00
Oliver Blanthorn
a1ee126746
Fix #4234: document superignore in more places 2022-05-15 14:42:36 +02:00
gholk
ceb5b71697
[PATCH] Fix this binding in WIP cheaper URI change event
Bind the pushState and replaceState to history
so they will not lost their this.
Except the this binding problem, I'm not sure whether
this URI change event code will work.
2022-05-10 18:42:50 +02:00
Oliver Blanthorn
6f96435428
Merge branch 'feat/proxy' 2022-05-06 12:23:56 +02:00