Florian Bruhin
b74a97580f
Handle completions for ValueList sections correctly
2014-05-02 14:18:40 +02:00
Florian Bruhin
379a6219ec
Fix config escape comment
2014-05-02 13:30:51 +02:00
Florian Bruhin
f935d99d52
Don't escape values anymore
2014-05-02 13:28:04 +02:00
Florian Bruhin
b6b9738c25
Revert "Don't escape values in configdata."
...
This reverts commit cb0d0d1af2
.
2014-05-02 13:24:10 +02:00
Florian Bruhin
24939603ea
Revert "Escape values in default config comments"
...
This reverts commit be86ca03e2
.
2014-05-02 13:24:07 +02:00
Florian Bruhin
de368aa43d
Revert "More escaping fixes"
...
This reverts commit fcb10e2bff
.
2014-05-02 13:24:00 +02:00
Florian Bruhin
0640eacb95
Catch ValueError when catching :set errors
2014-05-02 12:27:06 +02:00
Florian Bruhin
fcb10e2bff
More escaping fixes
2014-05-02 12:25:30 +02:00
Florian Bruhin
3b015cd5df
Cache ordered values in ValueList section
2014-05-02 11:46:58 +02:00
Florian Bruhin
be86ca03e2
Escape values in default config comments
2014-05-02 11:30:51 +02:00
Florian Bruhin
cb0d0d1af2
Don't escape values in configdata.
2014-05-02 11:28:36 +02:00
Florian Bruhin
554d5d2745
Fix command length (s/args/nargs)
2014-05-02 11:28:11 +02:00
Florian Bruhin
615a2e0bb5
Handle invalid hinting modes/targets
2014-05-02 11:25:24 +02:00
Florian Bruhin
ae0966a384
Fix encoding issues on windows.
...
locale.getpreferredencoding(False) returns cp1252 on Windows, which is
unable to parse our nice unicode arrows.
Therefore, we always need to specify the encoding when using open().
Also we exclude configdata.py from pep257 on Windows because it doesn't
detect the encoding correctly... Bug is submitted:
https://github.com/GreenSteam/pep257/issues/70
2014-05-02 11:15:38 +02:00
Florian Bruhin
be467d5e50
Refactor command argument splitting.
...
This uses split=True/False as cmdutils.register argument again (because
we would never want to set maxsplit ourselves, only not splitting the
*last* argument makes any sense.
Also this uses shlex for splitting again, like earlier.
2014-05-02 10:28:41 +02:00
Florian Bruhin
de5f85982f
Add new _tabopen method for tabopen and backtabopen.
2014-05-02 10:11:47 +02:00
Florian Bruhin
836a5e04a5
Allow empty keys in config
2014-05-02 06:59:46 +02:00
Florian Bruhin
678abca244
Make user agent configurable
2014-05-02 06:55:55 +02:00
Florian Bruhin
bb70fa1c5a
Make FIRST_COMMENT in configdata a rawstring
2014-05-01 23:28:40 +02:00
Florian Bruhin
14617111a8
Remove old logging
2014-05-01 23:27:49 +02:00
Florian Bruhin
2d8c8fa40f
Fix up/down keybindings. Whooops.
2014-05-01 23:27:18 +02:00
Florian Bruhin
4137e5de53
Don't use QShortcut for space scrolling
2014-05-01 23:25:51 +02:00
Florian Bruhin
3babead395
Don't crash if frame is none in mouseDownEvent
2014-05-01 21:35:24 +02:00
Florian Bruhin
427fe0b8fb
Make tab seperator 2px broad
2014-05-01 21:30:29 +02:00
Florian Bruhin
8c253ae611
Catch config.NoOptionError when reading config
2014-05-01 21:20:17 +02:00
Florian Bruhin
6a725aa87f
Fix escaping in config
2014-05-01 21:09:29 +02:00
Florian Bruhin
0bf918631e
Handle maxsplit=-1 correctly for completions
2014-05-01 20:18:29 +02:00
Florian Bruhin
3ed22ffcbe
Return transformed value in get
2014-05-01 20:06:34 +02:00
Florian Bruhin
af6f6b99e9
Catch ValueError when reading config
2014-05-01 19:57:14 +02:00
Florian Bruhin
53464dcbab
Fix ambigious keybinding detection.
...
Previously we only checked if the *last* char of the current keychain
matches the last char of a binding, which e.g. matched 'la' when we
pressed 'ka'.
Now we simply check if the binding *starts* with the keychain, which
also is easier to do.
2014-05-01 19:48:52 +02:00
Florian Bruhin
7aef865b0d
Lint fixes
2014-05-01 19:42:51 +02:00
Florian Bruhin
8556d06ae7
Add do-not-track and accept-language headers
2014-05-01 17:54:50 +02:00
Florian Bruhin
cb8f824f01
Add basurl
2014-05-01 16:40:14 +02:00
Florian Bruhin
5d80831752
prevpage/nextpage updates
2014-05-01 16:35:26 +02:00
Florian Bruhin
a3126635d4
Revert changes in _click
2014-05-01 15:29:18 +02:00
Florian Bruhin
fd678ff864
Make hints work
2014-05-01 15:27:32 +02:00
Florian Bruhin
12b36de5b5
Start implementing prev/next
2014-05-01 00:26:18 +02:00
Florian Bruhin
b9d7c7e7d9
Lint fixes
2014-05-01 00:24:53 +02:00
Florian Bruhin
533d82417e
Refactor completion handling
2014-05-01 00:23:53 +02:00
Florian Bruhin
b04adca059
Scroll to first item when wrapping completion
2014-04-30 13:52:16 +02:00
Florian Bruhin
7ce0bd8bc8
Force textEdited emit on set_cmd_text
2014-04-30 12:06:23 +02:00
Florian Bruhin
f1942b0ce0
Use selectionChanged to select completions
2014-04-30 12:03:24 +02:00
Florian Bruhin
adfc96cdfa
completion: Use textEdited instead of textChanged
...
This gets rid of _ignore_next and some unneeded logic, since textEdited
won't even emit if we edited it programatically.
2014-04-30 11:52:30 +02:00
Florian Bruhin
903d1876af
Handle editor errors
2014-04-30 10:59:43 +02:00
Florian Bruhin
4e2517a94f
Run sub-commands correctly
2014-04-30 10:47:46 +02:00
Florian Bruhin
1488e54567
Fix docstrings
2014-04-30 10:46:20 +02:00
Florian Bruhin
995a0d19cc
Clean up command exception handling
2014-04-30 10:43:40 +02:00
Florian Bruhin
689723508f
Add broken JS checking for commands
2014-04-30 10:05:55 +02:00
Florian Bruhin
1eabbfbfcf
Replace QAbstractItemModel by QStandardItemModel.
...
This is probably the most depressing commit ever.
For some reason I didn't find this while searching for models I could
use and rolled my own one. This uses A LOT less code, and is A LOT
faster...
2014-04-30 07:32:51 +02:00
Florian Bruhin
bc02df0bde
Add open_editor command
2014-04-29 22:16:44 +02:00
Florian Bruhin
63d03726ef
HTML fixes
2014-04-29 17:23:50 +02:00
Florian Bruhin
9fd7f8b975
Rewrite HintManager.fire to use handler dicts
2014-04-29 09:09:42 +02:00
Florian Bruhin
9ef956ae5e
Fix some checks
2014-04-29 08:38:01 +02:00
Florian Bruhin
2a7062c5c8
Modify read_file to use pkg_utils
2014-04-29 06:44:47 +02:00
Florian Bruhin
8ca82b0503
Restructure __main__.py to work with setuptools
2014-04-28 23:20:12 +02:00
Florian Bruhin
0d92e34310
Fix/silence checks
2014-04-28 00:05:14 +02:00
Florian Bruhin
bfecafd686
Report if instance in cmdutils.register is missing
2014-04-28 00:01:21 +02:00
Florian Bruhin
a0f27fed61
Add manual hint following
2014-04-27 21:59:23 +02:00
Florian Bruhin
8474bbdf6a
Rename and reorder config options
2014-04-27 21:21:14 +02:00
Florian Bruhin
4692414255
Support file:// as special URLs
2014-04-26 14:47:00 +02:00
Florian Bruhin
9252ef94ca
Consistent string chars
2014-04-25 16:53:23 +02:00
Florian Bruhin
35ba97d338
Escape special INI chars in ConfigManager
2014-04-25 15:57:28 +02:00
Florian Bruhin
33f9aad6d8
bugfix: Order ValueList values in config properly
2014-04-25 14:13:31 +02:00
Florian Bruhin
c9a25d6309
Catch configparser exceptions on start
2014-04-25 13:55:26 +02:00
Florian Bruhin
46cf62ab34
Don't crash in exception handler when new option is in ValueList
2014-04-25 13:55:03 +02:00
Florian Bruhin
0187623950
Add navigation by arrow keys
2014-04-25 13:37:54 +02:00
Florian Bruhin
bc077f7503
Check if currentFrame() is None when starting hints
2014-04-25 13:21:14 +02:00
Florian Bruhin
0a710ab18a
Herpderp, CRLF
2014-04-25 12:34:17 +02:00
Florian Bruhin
3390a4b8d7
Indent fix
2014-04-25 12:33:41 +02:00
Florian Bruhin
da91907656
Unfiy completions into single file
2014-04-25 12:29:00 +02:00
Florian Bruhin
875666265b
s/BrowserTab/WebView/g
2014-04-25 12:24:26 +02:00
Florian Bruhin
6e78f67a81
Rename keyinput stuff
2014-04-25 12:21:01 +02:00
Florian Bruhin
c087efb1fd
Rename Config to ConfigManager
2014-04-25 12:07:37 +02:00
Florian Bruhin
d4b35b6734
Rename {Command,Seach}Parser to *Manager
2014-04-25 12:04:11 +02:00
Florian Bruhin
937196e287
Rename package-private modules to _foo.py
2014-04-25 11:50:30 +02:00
Florian Bruhin
47d8777179
Move simplebrowser.py
2014-04-25 11:32:15 +02:00
Florian Bruhin
2474b5a806
Add binding i -> enter_mode insert
2014-04-25 11:22:14 +02:00
Florian Bruhin
f437bc25bf
Fix lint/cleanup
2014-04-25 11:21:00 +02:00
Florian Bruhin
b7440b1f79
Small exception handling cleanup in parsers.py
2014-04-25 11:02:41 +02:00
Florian Bruhin
7787a67c45
Add modes=[]/not_modes=[] to cmdutils.register
2014-04-25 10:10:58 +02:00
Florian Bruhin
80d6dc9cf7
Update documentation for keybind.command confsect
2014-04-25 09:51:17 +02:00
Florian Bruhin
43c8a96621
s/command_item/completion_item/
2014-04-25 09:28:02 +02:00
Florian Bruhin
2d0225a292
Hide command_item_{prev,next}
2014-04-25 09:27:30 +02:00
Florian Bruhin
aeb4980f7e
Also handle Return via config
2014-04-25 09:26:52 +02:00
Florian Bruhin
74374df5fd
Leave command mode on return press
2014-04-25 09:24:40 +02:00
Florian Bruhin
b4b72f07b7
Remove FIXME which is in TODO
2014-04-25 09:22:27 +02:00
Florian Bruhin
c4be264c44
Improve logging in eventFilter
2014-04-25 09:22:01 +02:00
Florian Bruhin
8cba290dae
Update eventFilter to track releases
2014-04-25 09:20:19 +02:00
Florian Bruhin
5ee6b2adfa
Revert "Remove setting forward_unbound_keys."
...
This reverts commit d07e22bd91
.
2014-04-25 08:40:46 +02:00
Florian Bruhin
f50fda7f9a
Replace Backtab key by Tab
2014-04-25 08:40:07 +02:00
Florian Bruhin
a29a9a9b70
Handle Command widget based on modes, not focus
2014-04-25 08:38:11 +02:00
Florian Bruhin
55a8da7f1b
Start using KeyParser for command mode
2014-04-25 07:50:21 +02:00
Florian Bruhin
405194d040
Add passthrough mode
2014-04-25 07:13:57 +02:00
Florian Bruhin
3407f3131d
Register enter_mode command
2014-04-25 07:13:36 +02:00
Florian Bruhin
b4033ced8b
Add generic PassthroughKeyParser, remove InsertKeyParser
2014-04-25 07:09:12 +02:00
Florian Bruhin
035a6a0847
Don't bind Ctrl-C in insert mode
2014-04-25 07:01:58 +02:00
Florian Bruhin
d07e22bd91
Remove setting forward_unbound_keys.
...
It introduced a lot of unnecessary complexity (e.g. tracking KeyReleases
to their KeyPresses...) for little benefit.
2014-04-25 06:54:17 +02:00
Florian Bruhin
83f829ed93
Add more logging to eventFilter
2014-04-25 06:54:13 +02:00
Florian Bruhin
8f9d7542a6
Fix eventFilter logic to not handle same event multiple times
2014-04-25 06:22:01 +02:00
Florian Bruhin
84682f90fa
Log events in eventHandler
2014-04-25 00:10:07 +02:00
Florian Bruhin
926194849c
Use normal commands for hint mode
2014-04-24 23:47:02 +02:00
Florian Bruhin
540c134f06
Add keytypes to KeyParser.execute()
2014-04-24 23:46:37 +02:00
Florian Bruhin
5aaf3b3430
Add abstract execute() to KeyParser
2014-04-24 23:23:28 +02:00
Florian Bruhin
e06583ade2
Use normal command to leave insert mode
2014-04-24 23:09:12 +02:00
Florian Bruhin
a1fd1537bd
Remove the possibility to pass bindings to KeyParser init
2014-04-24 22:59:01 +02:00
Florian Bruhin
8cca182734
Split NormalKeyParser from CommandKeyParser
2014-04-24 22:56:55 +02:00
Florian Bruhin
0def82fe8c
Fix lint
2014-04-24 22:49:06 +02:00
Florian Bruhin
581b715b42
Add __init__.py for keyinput
2014-04-24 22:41:01 +02:00
Florian Bruhin
7a6a605702
Unify KeyParsers again
2014-04-24 22:40:16 +02:00
Florian Bruhin
9ab8f42e20
s/commandmode/normalmode
2014-04-24 21:37:51 +02:00
Florian Bruhin
ea6a25714a
Make eventFilter work when mode is None
2014-04-24 21:29:28 +02:00
Florian Bruhin
9320c813f7
Add set_cmd_text to MessageBridge
2014-04-24 21:28:24 +02:00
Florian Bruhin
0c15517352
s/<normal>/<leave>/
2014-04-24 21:19:29 +02:00
Florian Bruhin
d2dc0b7ac5
Add KeyParser for normal mode
2014-04-24 21:12:55 +02:00
Florian Bruhin
c674d96cfe
Reorganize input modules into keyinput subpackage
2014-04-24 21:03:45 +02:00
Florian Bruhin
ecdd887664
Split KeyParser into KeyParser (non-chain) and KeyChainParser
2014-04-24 19:21:38 +02:00
Florian Bruhin
6311deb6b0
Read unbound-keys setting only once
2014-04-24 19:06:51 +02:00
Florian Bruhin
6f7391d7d1
Leave insert mode in loadStarted
2014-04-24 19:06:51 +02:00
Florian Bruhin
718295eb9f
Use <> instead of @@ for special keys
2014-04-24 17:48:38 +02:00
Florian Bruhin
8648d88b51
Handle special keys instead of only modifiers
2014-04-24 17:43:19 +02:00
Florian Bruhin
0e3e588038
Add forward_unbound_keys setting
2014-04-24 16:53:16 +02:00
Florian Bruhin
b372c23b80
Move hint webelem code to utils.webelem
2014-04-24 16:30:59 +02:00
Florian Bruhin
6fb52e610d
Leave insert mode when loadFinished with ok=False
2014-04-24 16:27:18 +02:00
Florian Bruhin
1c5ae25b68
Start implementing auto_insert_mode
2014-04-24 16:03:16 +02:00
Florian Bruhin
10d7d887ec
Pass keypresses to statusbar correctly
2014-04-24 15:47:38 +02:00
Florian Bruhin
b3418cae5d
Improve _is_editable()
2014-04-24 13:13:58 +02:00
Florian Bruhin
ff887c647d
Don't append mode to mode stack if it's already
2014-04-24 07:44:54 +02:00
Florian Bruhin
b9d845180e
Better logging for ModeManager
2014-04-24 07:44:47 +02:00
Florian Bruhin
a82ab6d707
Go to insert mode when plugin clicked
2014-04-24 07:41:20 +02:00
Florian Bruhin
5b84848ad9
s/leaved/left/g
2014-04-24 07:01:27 +02:00
Florian Bruhin
95691e1e11
Show passthrough modes in statusbar
2014-04-24 06:59:39 +02:00
Florian Bruhin
afa9c47867
Lint cleanups
2014-04-24 06:45:38 +02:00
Florian Bruhin
3d292fbc27
Use a stack for current modes
2014-04-24 06:44:58 +02:00
Florian Bruhin
f3db29c010
Enter normal mode when clicking non-editable elem
2014-04-23 23:26:02 +02:00
Florian Bruhin
b4b9b6c69d
Enter/leave command mode for Command widget
2014-04-23 23:25:06 +02:00
Florian Bruhin
cd5f2562aa
Adjust eventFilter to use new features
2014-04-23 23:24:46 +02:00
Florian Bruhin
e56d33badc
Check if handler is available for new mode
2014-04-23 23:23:30 +02:00
Florian Bruhin
5385307582
Register modes explicitely with modemanager.
2014-04-23 23:23:04 +02:00
Florian Bruhin
fc11021c08
Add a passthrough argument to modemanager register()
2014-04-23 23:22:34 +02:00
Florian Bruhin
522a703863
Remove module-level modemanager register()
2014-04-23 23:21:29 +02:00
Florian Bruhin
8f44b56923
Start implementing eventFilter in ModeManager
2014-04-23 23:20:39 +02:00
Florian Bruhin
a33c9827d6
Check for editable fields in mousePressEvent
2014-04-23 21:18:05 +02:00
Florian Bruhin
ce48ed9b8e
Add entered/leaved signals to modemanager
2014-04-23 21:15:47 +02:00
Florian Bruhin
8b5daad367
Add ModeManager
2014-04-23 21:15:47 +02:00
Florian Bruhin
387d0e3be6
Document hint lastChild() hack
2014-04-23 14:34:00 +02:00
Florian Bruhin
a67ed4d054
Override mousePressEvent instead of event
2014-04-23 07:34:23 +02:00
Florian Bruhin
2c5bb6a413
cmdutils.register: Support functions with no docstring
2014-04-23 07:32:00 +02:00
Florian Bruhin
7acd32a5d7
Display error when there's nothing to undo
2014-04-23 06:17:36 +02:00
Florian Bruhin
61802725a6
Actually use message.error for errors
2014-04-23 06:17:29 +02:00
Florian Bruhin
46f1a2a0d0
Add log_events decorator
2014-04-22 23:50:56 +02:00