Commit graph

2457 commits

Author SHA1 Message Date
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
Oliver Blanthorn
880a75914d
Add some crazy binds to tridactylrc 2019-02-03 16:53:43 +00:00
Oliver Blanthorn
de954ddc9c
Merge branch 'guiset_statuspanel' 2019-02-03 15:45:23 +00:00
Oliver Blanthorn
fb4b78cbe4
Add missing backtick 2019-02-03 15:45:11 +00:00
Oliver Blanthorn
b2494a236c
Merge branch 'add_doc' 2019-02-03 15:44:14 +00:00
Oliver Blanthorn
9fc0799701
Fix minor typos 2019-02-03 15:43:56 +00:00
Oliver Blanthorn
69a1c1a88d
Merge pull request #1310 from glacambre/mention_disable
excmds.ts: use word "disable" in mode/blacklistadd doc
2019-02-03 10:48:49 +00:00
glacambre
536dcb3abc
css_utils.ts: Add statuspanel rule
Related issue: https://github.com/tridactyl/tridactyl/issues/1284#issuecomment-459488419
2019-02-03 08:55:40 +01:00
glacambre
a7336900e3
contributing.md: Fix typos/missing links 2019-02-03 07:52:05 +01:00
glacambre
e108cbce7d
excmds.ts: use word "disable" in mode/blacklistadd
As mentionned in https://github.com/tridactyl/tridactyl/issues/339, this
could be useful for users looking for the word 'disable' in the help
pages.
2019-02-03 06:22:53 +01:00
Oliver Blanthorn
a1186fbd79
Merge pull request #1301 from Rahlir/jshinting
Option to disable javascript hinting
2019-02-02 17:38:17 +00:00
glacambre
4b77ff90c2
contributing.md: Explain build process 2019-02-02 14:54:25 +01:00
glacambre
d5ac90a809
contributing.md: Add architecture and macro explanation 2019-02-02 11:31:17 +01:00