Commit graph

2503 commits

Author SHA1 Message Date
glacambre
02c133fa0b
native.ts: implement proper profile-checking
https://github.com/tridactyl/tridactyl/pull/1355 introduced a bug on
systems where profile names do not match profile paths. Fixing it
required implementing proper profiles.ini parsing, which should help
making profile discovery work on windows.

The new getProfileDir() function breaks compatibility with previous
versions. The previous version turned backslashes into slashes on
windows. I believe doing this is wrong since paths such as
`C:/Users/Bob` do not make any sense on windows. They might work in
mingw and wsl but I believe we should aim to have everything work on
'normal' windows.
2019-02-23 14:22:49 +01:00
Nuno Santos
69f21ce91f MacOS build fixes.
- Fix `find` in bodgecss.sh appending an extra /
- Remove bashism from bodgecss.sh which doesn't work in 3.2 (macos
default)
- Remove `-p .` from mktemp which is unnecessary and doesn't exist on macos.
2019-02-22 16:47:17 +01:00
Oliver Blanthorn
ac6de140c0
Merge pull request #1373 from tridactyl/feedme
Add gentle invitation for donations on newtab
2019-02-21 23:22:13 +00:00
Oliver Blanthorn
ee7bf293b0
Add issue link 2019-02-21 23:21:41 +00:00
Oliver Blanthorn
b6417355e0
Merge pull request #1363 from glacambre/content_editor
Content editor
2019-02-20 07:55:57 +00:00
glacambre
755e42bb9a
excmds.ts: Move :editor to the content script
Having `:editor` in the background script and constantly messaging the
content one to update the page doesn't really make sense. This commit
moves `:editor` to the content script and thus simplifies the code a
little bit.
2019-02-20 07:09:32 +01:00
glacambre
68a8fccb50
Mobe background/native_background.ts to lib/native.ts
All functions in native_background.ts use browserBg in order to interact
with the native messenger. This means that these functions can also be
used in the content script. This means that there's no point in keeping
these functions in the background/ folder and that there's no point in
having a native_background message type.
2019-02-20 07:09:01 +01:00
Oliver Blanthorn
c734e3982a
To the moon! 2019-02-19 21:40:37 +00:00
Oliver Blanthorn
c0a1e2a9b9
Merge pull request #1372 from MannySchneck/scrollto-hint
feat/minor: add hint that scrolls element to the top of a page
2019-02-19 21:38:14 +00:00
Oliver Blanthorn
6703e5b0d8
Merge pull request #1375 from antonva/bsd-build
Portable builds
2019-02-19 21:33:43 +00:00
Anton Vilhelm Ásgeirsson
ce10ef2fba Refactor bodgecss to use portable tooling. 2019-02-19 20:31:21 +00:00
Anton Vilhelm Ásgeirsson
66b36cf5ae Replace OSTYPE with uname and add yet another sed variant. 2019-02-19 17:49:40 +00:00
Anton Vilhelm Ásgeirsson
d3e2d3dbec Use utf-8 explicitly for macro script. 2019-02-19 16:58:46 +00:00
Manny Schneck
862fd2de94 feat/minor: add hint that scrolls element to the top of a page 2019-02-19 10:49:19 -06:00
Oliver Blanthorn
15a8b3d031
Add gentle invitation for donations on newtab 2019-02-19 14:53:33 +00:00
Oliver Blanthorn
4c2a7025be
Merge pull request #1368 from vviikk/patch-1
Add Ctrl+g shortcut info to cycle through search results
2019-02-18 17:36:28 +00:00
Oliver Blanthorn
88ad368944
Merge pull request #1369 from rodrigoaguilera/master
Fix path to tutor page
2019-02-18 17:35:56 +00:00
Rodrigo
463593b22e
Fix path to tutor page 2019-02-18 16:11:45 +01:00
Vik Ramanujam
64880252d0
Add Ctrl+g shortcut info to cycle through search results 2019-02-18 20:17:48 +05:30
Oliver Blanthorn
00b6027e3e
Merge pull request #1364 from robertgzr/winopen-popup
Add -popup option to winopen excmd
2019-02-18 08:48:34 +00:00
Robert Günzler
f2541e4de9 Add -popup option to winopen excmd
Opens the new window as a popup without the usual browser UI.
This can be combined with -private in any order.

Resolves #1357
2019-02-16 13:56:37 +01:00
Oliver Blanthorn
317d3878f2
Merge pull request #1361 from glacambre/define_leavegithubalone
config.ts: Add leavegithubalone setting to config.ts
2019-02-14 21:44:46 +00:00
glacambre
bcb518221a
config.ts: Add leavegithubalone setting to config.ts
leavegthubalone is used in content.ts but wasn't defined in config.ts.
This didn't cause any bugs but prevented leavegithubalone from being
shown in command line completions. This commit fixes that.
2019-02-14 22:18:28 +01:00
Oliver Blanthorn
5466c1be04
Merge branch 'fix_234' 2019-02-13 13:43:57 +00:00
Oliver Blanthorn
7e844fe23b
Merge pull request #1356 from glacambre/win_fail_profiledir
native_background.ts: make getProfileDir fail on win if profiledir unset
2019-02-13 12:26:58 +00:00
glacambre
aed8338427
native_background.ts: Fail if profile couldn't be found on linux
profilecmd.code is not necessarily different from 0 if `find` doesn't
return any results. This commit makes sure getProfileDir() checks for
such situations.
2019-02-13 13:22:58 +01:00
glacambre
4734214f9e
native_background.ts: make getProfileDir fail on win if profiledir unset
`profiledir` defaults to "auto" which is not a valid profile path, yet
that's what getProfileDir() returned before this commit.
2019-02-13 12:58:53 +01:00
Oliver Blanthorn
c341ea47db
Merge pull request #1355 from glacambre/better_nativeopen
nativeopen: detect profile, enable space in URLs
2019-02-13 11:44:17 +00:00
glacambre
3c9fc84f6d
nativeopen: detect profile, enable space in URLs
This commit does two things:
- If the user didn't specify any arguments, try to detect what profile
  is currently being used and specify it in the command passed to
  firefox. This makes sure tabs opened with `:nativeopen` are opened
  with the right profile if multiple firefox profiles are running.
- Quote url argument to enable adding spaces and quotes to the URL
  (closes #555)
2019-02-13 07:51:42 +01:00
Oliver Blanthorn
f40689e47f
Merge pull request #1354 from glacambre/fix_build_error
commandline_frame.ts: Fix compile-time error
2019-02-13 00:17:18 +00:00
glacambre
f119a89ac5
commandline_frame.ts: Fix compile-time error
10cb692d72 broke the build bot by
introducing type incompatibilites. This is fixed by making sure .catch()
returns an array.
This enables removing the try/catch in the input event handler since
the await won't throw anymore.
2019-02-12 12:43:53 +01:00
Oliver Blanthorn
ec43f7bb1c
Merge pull request #1350 from glacambre/reverse_img_search_hint
config.ts: Add reverse-search bindings
2019-02-12 09:14:58 +00:00
glacambre
2d8481fcc8
help.ts: Display composite binds in help pages 2019-02-12 08:51:58 +01:00
Oliver Blanthorn
952a2537b6
Merge pull request #1347 from glacambre/relieve_1345
commandline_frame.ts: Catch errors in refresh_completions
2019-02-11 20:51:18 +00:00
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