Commit graph

2519 commits

Author SHA1 Message Date
glacambre
99289e4cd7
config.ts: Add reverse-search bindings
Closes #924.
2019-02-11 19:35:40 +01:00
glacambre
10cb692d72
commandline_frame.ts: Catch errors in refresh_completions
https://github.com/tridactyl/tridactyl/issues/1345 describes a problem
where completion computation fails and fills the command line with an
error message.
This commit doesn't make the underlying problem disappear but prevents
Tridactyl from spamming the command line.
2019-02-11 19:26:26 +01:00
Oliver Blanthorn
3089c2eaee
Merge pull request #1348 from glacambre/fix_terminator
native_background.ts: Fix terminator not working as editorcmd
2019-02-11 09:43:44 +00:00
Oliver Blanthorn
ed7476b20e
Merge pull request #1349 from glacambre/fix_1099
native/install.sh: Warn user on failure to create manifest/messenger
2019-02-11 09:41:12 +00:00
glacambre
a287f82c7a
native/install.sh: Warn user on failure to create manifest/messenger
https://github.com/tridactyl/tridactyl/issues/1099 happened because of a
misconfigured $XDG_DATA_DIR. This could have been caught by checking
that the manifest and the messenger actually exist. This commit adds
these checks.

Closes #1099.
2019-02-11 07:25:29 +01:00
heshamsafi
e0545aca65
native_background.ts: Fix terminator not working as editorcmd
There were two problems: first, the format string used by terminator and
termite was wrong: tuicmd was appended after "%f", which resulted in
tridactyl telling the emulator to execute the file rather than the
tuicmd.
The second issue was that, as mentionned in
https://github.com/tridactyl/tridactyl/issues/1346, `-u` was missing
from terminator's options.
2019-02-11 05:15:16 +01:00
Oliver Blanthorn
cd99fe78c5
Merge pull request #1344 from glacambre/fix_help_completions
completions/Help.ts: Fix completions not being properly deselected
2019-02-10 11:50:56 +00:00
glacambre
27fcabdb87
completions/Help.ts: Fix completions not being properly deselected
Before this commit, the following steps caused a completion option to be
wrongly inserted in the command line: `:h -e<Tab><Backspace>a<Space>`.
This commit fixes that by making sure that the completion sources forget
the selected completion option on changes.
2019-02-10 11:03:26 +01:00
Oliver Blanthorn
b4efcd1a8c
Merge pull request #1343 from glacambre/fix_1340
Fix #1340
2019-02-09 16:06:39 +00:00
Oliver Blanthorn
32a4bc0bda
Merge pull request #1341 from glacambre/fix_1329
commandline_frame.ts: update HISTORY_SEARCH_STRING when needed
2019-02-09 16:05:31 +00:00
glacambre
6079c36e7d
finding.ts: Make sure all matches are visible 2019-02-09 13:37:57 +01:00
glacambre
2dad1c0230
dom.ts: make isVisible use parentElement clientRect if necessary
In some cases, you might need to call isVisible on a text node. These
nodes don't have their own getClientRects method. It makes sense to
check the parent node's getClientRects method instead since its
visibility impacts its child node's.
2019-02-09 13:36:18 +01:00
glacambre
8f33350d21
commandline_frame.ts: update HISTORY_SEARCH_STRING when needed
https://github.com/tridactyl/tridactyl/issues/1329 describes a bug that
can be triggered with the following key presses:

:t<ArrowUp><ArrowDown><Backspace>w<ArrowUp>

This results in the commandline being filled with a command starting
with `t` rather than `w`. This is caused by not updating the
HISTORY_SEARCH_STRING variable on changes and is fixed by always
resetting it if the previous command did not call history().

Closes #1329.
2019-02-09 13:07:47 +01:00
glacambre
053a2ab2c0
Cancel key{up,press} evts when corresponding keydown is cancelled
Closes https://github.com/tridactyl/tridactyl/issues/234.
2019-02-09 11:48:20 +01:00
Oliver Blanthorn
7db70f1393
Merge pull request #1335 from glacambre/fix_findnext
Fix findnext
2019-02-08 13:31:33 +00:00
glacambre
a8d7cf651b
finding.ts: Make focusMatch() prefer focusing anchors if possible 2019-02-08 12:41:47 +01:00
Oliver Blanthorn
c12ded0004
Merge pull request #1336 from glacambre/fix_openInTab
webext.ts: Fix openInTab() leaving a space in search queries
2019-02-08 09:56:51 +00:00
Oliver Blanthorn
6a0bf55fc3
Merge pull request #1337 from glacambre/better_help
Better help
2019-02-08 09:55:35 +00:00
glacambre
a480a593aa
commandline.css: Force help completion width to 25% of available space 2019-02-08 08:12:01 +01:00
glacambre
65dc89cfce
completions/Help.ts: Make help completion aware of new :help flags 2019-02-08 08:08:46 +01:00
glacambre
002de8a2ca
excmds.ts: Add flags to :help
These flags are -a, -b, -e, -s and can be used to help Tridactyl know
what it should jump to in case of conflicts (e.g. when there's an `h`
binding and an `h` alias).
2019-02-08 07:40:24 +01:00
glacambre
0e9d1a3085
webext.ts: Fix openInTab() leaving a space in search queries
Before this commit, `rest` contained a space, which was not a problem
when performing regular queries but was one when constructing urls.
2019-02-08 06:15:30 +01:00
Oliver Blanthorn
92f82016f2
Merge pull request #1333 from glacambre/fix_1279
config.ts: bind ;t to `hint -W tabopen` by default
2019-02-07 08:35:20 +00:00
glacambre
f1c0e5276f
finding.ts: Make find/findnext focus elements
Closes https://github.com/tridactyl/tridactyl/issues/1297
2019-02-07 08:52:26 +01:00
glacambre
6a5fdefcd9
Make findnext default to global previous search if needed 2019-02-07 08:33:30 +01:00
glacambre
cc24a69b10
finding.ts: add cleanslate to TridactylSearchHighlight elements 2019-02-07 08:18:56 +01:00
glacambre
b4a50328ba
Make findnext default to 1 and display messages on errors 2019-02-07 07:52:47 +01:00
glacambre
462fbe4d59
config.ts: bind ;t to hint -W tabopen by default
This binding was asked for at least twice no IRC and it also makes sense
to have ti when looking at
https://github.com/tridactyl/tridactyl/issues/1279 .

Closes #1279.
2019-02-07 07:34:31 +01:00
Oliver Blanthorn
799f2d3233
Merge branch 'fix_1295' 2019-02-06 15:30:51 +00:00
Oliver Blanthorn
469159d862
Merge branch 'add_searchengine_support' 2019-02-06 15:26:09 +00:00
Oliver Blanthorn
26701e4069
Merge branch 'pinusc-master' 2019-02-06 15:22:45 +00:00
Oliver Blanthorn
883f951e8c
Improve shadow-bind error message 2019-02-06 15:21:58 +00:00
Oliver Blanthorn
397b9f84be
Merge pull request #1328 from glacambre/better_D
config.ts: Remove sleep from 'D' bind
2019-02-06 07:48:30 +00:00
glacambre
431a7ec5dd
config.ts: Remove sleep from 'D' bind
The `sleep` command was added a long time ago to avoid race conditions
because tabprev didn't return a promise. Since tabprev now always
returns a promise which is resolved once a new tab is selected, it is
safe to remove the `sleep` call. This makes `D` feel smoother.

Tested on both a fast and a slow computer with high load.
2019-02-06 08:45:08 +01:00
Oliver Blanthorn
fcc9488169
Merge pull request #1325 from glacambre/fix_viewsource
Fix viewsource
2019-02-05 23:36:46 +00:00
Oliver Blanthorn
29ae8458cc
Merge pull request #1327 from glacambre/uncomment_run_exstr
excmds.ts: uncomment run_exstr
2019-02-05 23:36:12 +00:00
glacambre
65db93caf3
viewsource.css: Make viewsource actually respect colorscheme 2019-02-05 18:29:57 +01:00
glacambre
a4ad43cf77
tutor.template.html: Fix viewsource not being visible 2019-02-05 18:29:54 +01:00
glacambre
f5cfc0a3a3
static/typedoc/layouts/default.hbs: Fix viewsource not working correctly 2019-02-05 18:29:50 +01:00
pinusc
4070aa0167 Warn when adding a binding that is shadowed by other bind (#1309) 2019-02-05 16:41:53 +01:00
glacambre
5743f0ce7d
excmds.ts: uncomment run_exstr
Closes https://github.com/tridactyl/tridactyl/issues/1275
2019-02-05 08:27:59 +01:00
glacambre
e098e48e44
commandline_frame.ts: Simplify completion-updating mechanism
https://github.com/tridactyl/tridactyl/issues/1295 reports that
sometimes, completions won't be offered for excmds even though they
should. This happened because of the following steps:

- A letter is pressed, triggering an "input" event which schedules
  completion computation
- <Space> is pressed, which doesn't trigger an "input" event since it's
  bound to an excmd. However, the excmd itself refreshes completions.
- The computation scheduled by the "input" event is run with the
  previous exstr, even though it isn't up to date anymore.

This is fixed by replacing all the complicated timeoutId checking with
exstr checking, which makes a lot more sense, is simpler and all around
better.

Closes #1295.
2019-02-05 05:22:48 +01:00
glacambre
e9945e49b6
excmds.ts: Use loadReplace where possible
Loadreplace will make openInTab() replace the current url in history if
possible. This is useful for winopen and tabopen as this will remove
Tridactyl's newtab page from history.
2019-02-04 18:43:16 +01:00
glacambre
d05b7ef039
excmds.ts: Add :searchsetkeyword back with an error message 2019-02-04 18:39:43 +01:00
glacambre
186c1a9904
excmds.ts: Remove setsearchkeyword and forceURI functions
setsearchkeyword has been deprecated for a while now and it was the last
place where forceURI was used.
It doesn't make sense to keep forceURI because using it for its intended
purpose (opening new tabs/windows) would make Tridactyl inconsistent:
while openInTab() is able to use Firefox's search engines, forceURI
isn't and search engine usage can't be added to forceURI due to API
mismatches.
2019-02-04 08:22:48 +01:00
glacambre
db5461e513
excmds.ts: Make open_quiet use openInNewTab() 2019-02-04 08:18:01 +01:00
glacambre
7c26cf8f9c
excmds.ts: Remove nativeopen checks from winopen
These checks are performed in nativeopen anyway.
2019-02-04 08:00:51 +01:00
glacambre
c0bbdcb536
excmds.ts: Make winopen use openInTab 2019-02-04 07:58:10 +01:00
glacambre
5217227eb9
webext.ts: Fix openInTab() not trying to treat search queries as domains 2019-02-04 07:47:33 +01:00
glacambre
509885cb1d
webext.ts: Fix "search" not performing a literal search in openInTab()
https://github.com/tridactyl/tridactyl/pull/1305#discussion_r251495428
2019-02-04 07:31:21 +01:00