vimb.git
7 years agoConsume events for all input modes
Michael Mackus [Sat, 5 Nov 2016 18:02:29 +0000 (11:02 -0700)]
Consume events for all input modes

7 years agocs
Michael Mackus [Wed, 2 Nov 2016 16:05:43 +0000 (09:05 -0700)]
cs

7 years agoEnsure all events are turned into input
Michael Mackus [Wed, 2 Nov 2016 03:12:51 +0000 (20:12 -0700)]
Ensure all events are turned into input

7 years agoProcess events through GDK
Michael Mackus [Tue, 1 Nov 2016 22:13:08 +0000 (15:13 -0700)]
Process events through GDK

7 years agoAdd rudimentary GdkEventKey queue
Michael Mackus [Tue, 1 Nov 2016 19:34:34 +0000 (12:34 -0700)]
Add rudimentary GdkEventKey queue

8 years agoFix default previouspattern
Nicolas Porcel [Sat, 1 Oct 2016 23:28:36 +0000 (01:28 +0200)]
Fix default previouspattern

8 years agoFixes default-zoom setting name
Robert Timm [Thu, 15 Sep 2016 23:16:27 +0000 (01:16 +0200)]
Fixes default-zoom setting name

8 years agoAdds default-zoom to man page
Robert Timm [Thu, 15 Sep 2016 23:02:26 +0000 (01:02 +0200)]
Adds default-zoom to man page

8 years agoCustom default_zoom disables HIGH_DPI logic
Robert Timm [Thu, 15 Sep 2016 22:48:52 +0000 (00:48 +0200)]
Custom default_zoom disables HIGH_DPI logic

8 years agoSet default_zoom via config
Robert Timm [Thu, 15 Sep 2016 22:47:16 +0000 (00:47 +0200)]
Set default_zoom via config

8 years agoAdds FEATURE_DEFAULT_ZOOM to config.def.h
Robert Timm [Thu, 15 Sep 2016 22:52:25 +0000 (00:52 +0200)]
Adds FEATURE_DEFAULT_ZOOM to config.def.h

8 years agoAllow link activation from search result #131.
Daniel Carl [Wed, 31 Aug 2016 21:32:40 +0000 (23:32 +0200)]
Allow link activation from search result #131.

When a search is performed and the current highlighted result is part of a
link, a click event is triggered on the link to open it. Currently the click()
is done by JavaScript on the element so that we can't control if the target
open in current window or in a new one.

8 years agoShow search match count also if highlight is off.
Daniel Carl [Wed, 31 Aug 2016 21:15:33 +0000 (23:15 +0200)]
Show search match count also if highlight is off.

8 years agoRemove duplicate text in README
vlampreia [Mon, 25 Jul 2016 16:02:42 +0000 (18:02 +0200)]
Remove duplicate text in README

8 years agoFixed typo in manual page #287
Daniel Carl [Sun, 24 Jul 2016 21:32:01 +0000 (23:32 +0200)]
Fixed typo in manual page #287

8 years agoUpdate license year.
Daniel Carl [Wed, 1 Jun 2016 21:12:39 +0000 (23:12 +0200)]
Update license year.

8 years agoFix typo
NotSpooky [Thu, 26 May 2016 14:16:51 +0000 (08:16 -0600)]
Fix typo

8 years agoDo ssl check also when the load failed #281.
Daniel Carl [Fri, 15 Apr 2016 11:10:01 +0000 (13:10 +0200)]
Do ssl check also when the load failed #281.

In case strict-ssl where enabled the load commited with our logic to check for
certificate errors was not called.
So the check is also done when the load failed, to show the state in case the
page could not be loaded because of an untrusted certificate.

8 years agoWrite soup cache to disk after each page load.
Daniel Carl [Fri, 15 Apr 2016 11:08:29 +0000 (13:08 +0200)]
Write soup cache to disk after each page load.

This allows new instances of vimb to pickup latest cache entries.

8 years agoAdd URI to the OpenBSD Port in README
Frederic Cambus [Mon, 11 Apr 2016 10:03:16 +0000 (12:03 +0200)]
Add URI to the OpenBSD Port in README

8 years agoUse the beginning position of links for hinting
Yutao Yuan [Mon, 28 Mar 2016 11:11:19 +0000 (19:11 +0800)]
Use the beginning position of links for hinting

8 years agoAdd license info to --version output.
Daniel Carl [Wed, 24 Feb 2016 09:54:05 +0000 (10:54 +0100)]
Add license info to --version output.

8 years agoUpdate the URI to the NetBSD port.
Daniel Carl [Sat, 30 Jan 2016 22:27:29 +0000 (23:27 +0100)]
Update the URI to the NetBSD port.

8 years agoFixed wrong path for the sockets.
Daniel Carl [Sun, 24 Jan 2016 19:03:15 +0000 (20:03 +0100)]
Fixed wrong path for the sockets.

8 years agoRemove element transitions for hinted elements.
Daniel Carl [Wed, 6 Jan 2016 09:43:16 +0000 (10:43 +0100)]
Remove element transitions for hinted elements.

8 years agoReleased version 2.11.
Daniel Carl [Thu, 17 Dec 2015 18:17:46 +0000 (19:17 +0100)]
Released version 2.11.

8 years agoAdded closed-max-items option
Yutao Yuan [Thu, 26 Nov 2015 04:28:36 +0000 (12:28 +0800)]
Added closed-max-items option

8 years agoUse sorting for completion by default.
Daniel Carl [Sun, 22 Nov 2015 21:30:05 +0000 (22:30 +0100)]
Use sorting for completion by default.

This makes the codes easeir to read, because the most completions should
be sorted.

8 years agoShow typed text as last completion entry (#253).
Daniel Carl [Sun, 22 Nov 2015 21:17:25 +0000 (22:17 +0100)]
Show typed text as last completion entry (#253).

This patch adapts the vim behaviour. If you reach the end of the
possible completion items, the initial content is written to the
inputbox. This makes it easier to change the filter string to reduce the
completion by simply step right to the very last entry with <S-Tab>.

8 years agoMerge branch 'build-pre-flock' of https://github.com/plredmond/vimb.
Daniel Carl [Tue, 17 Nov 2015 22:29:17 +0000 (23:29 +0100)]
Merge branch 'build-pre-flock' of https://github.com/plredmond/vimb.

8 years agofix ignored `echo -n ..` by piping through `tr -d ..`
PLR [Tue, 17 Nov 2015 18:42:06 +0000 (10:42 -0800)]
fix ignored `echo -n ..` by piping through `tr -d ..`

8 years agofix conflict with /usr/include/MacTypes.h `Style` type
PLR [Tue, 17 Nov 2015 03:08:13 +0000 (19:08 -0800)]
fix conflict with /usr/include/MacTypes.h `Style` type

8 years agoMerge branch 'fix-file-locking'.
Daniel Carl [Sun, 1 Nov 2015 21:50:12 +0000 (22:50 +0100)]
Merge branch 'fix-file-locking'.

8 years agoMerge branch 'fix_typo' of https://github.com/shioyama/vimb
Daniel Carl [Sun, 25 Oct 2015 19:18:20 +0000 (20:18 +0100)]
Merge branch 'fix_typo' of https://github.com/shioyama/vimb

8 years agoFix small grammar typo.
Chris Salzberg [Sun, 25 Oct 2015 01:16:38 +0000 (10:16 +0900)]
Fix small grammar typo.

8 years agoRefactor WebKitWebFrame assignment
Chris Salzberg [Thu, 22 Oct 2015 15:16:52 +0000 (00:16 +0900)]
Refactor WebKitWebFrame assignment

8 years agoInstall focus/blue callbacks when load finished
Chris Salzberg [Thu, 22 Oct 2015 15:05:31 +0000 (00:05 +0900)]
Install focus/blue callbacks when load finished

8 years agoUse flock instead of fcntl for file locking (#235).
Daniel Carl [Wed, 21 Oct 2015 17:46:50 +0000 (19:46 +0200)]
Use flock instead of fcntl for file locking (#235).

8 years agoFixed file locking using fcntl.
Yutao Yuan [Mon, 12 Oct 2015 05:11:51 +0000 (13:11 +0800)]
Fixed file locking using fcntl.

9 years agoAllow to show profile name in url bar.
Daniel Carl [Mon, 21 Sep 2015 18:20:29 +0000 (20:20 +0200)]
Allow to show profile name in url bar.

9 years agoFixed none shown command error if used by :source command.
Daniel Carl [Mon, 21 Sep 2015 09:00:45 +0000 (11:00 +0200)]
Fixed none shown command error if used by :source command.

Also clear the input after successful sourcing of a file.

9 years agoAdded path completion for :save command too.
Daniel Carl [Mon, 21 Sep 2015 08:09:30 +0000 (10:09 +0200)]
Added path completion for :save command too.

9 years agoAdded manual page section for :source command.
Daniel Carl [Mon, 21 Sep 2015 08:00:56 +0000 (10:00 +0200)]
Added manual page section for :source command.

9 years agoAdd :source command
Yutao Yuan [Sun, 13 Sep 2015 16:41:22 +0000 (00:41 +0800)]
Add :source command

9 years agoAdded ^ as normal mode alias of 0 (#236).
Daniel Carl [Sun, 23 Aug 2015 20:06:33 +0000 (22:06 +0200)]
Added ^ as normal mode alias of 0 (#236).

Use the ^ to scroll to the absolute left of the document like
pentadactyl does.

9 years agoAdded manual test for contenteditable element (#237).
Daniel Carl [Sun, 23 Aug 2015 07:24:38 +0000 (09:24 +0200)]
Added manual test for contenteditable element (#237).

9 years agoAdds support for contenteditable attribute as input mode trigger
Jiri Marsicek [Sat, 22 Aug 2015 19:58:25 +0000 (21:58 +0200)]
Adds support for contenteditable attribute as input mode trigger

fanglingsu/vimb#237

9 years agoDo not blur the focused element after alt-tabbing.
Benjamin Petrenko [Sun, 2 Aug 2015 09:53:54 +0000 (12:53 +0300)]
Do not blur the focused element after alt-tabbing.

9 years agoSupport for multiple configuration profiles (#129)
Jiri Marsicek [Wed, 29 Jul 2015 18:29:24 +0000 (20:29 +0200)]
Support for multiple configuration profiles (#129)

New parameter is introduced to allow multiple configuration profiles per
user.

If vimb is started with this parameter new configuration directory
is created under default configuration directory. Cache and socket file
are kept separate per profile as well.

If vimb is started without this parameter, behaviour is unchanged.

Resolves fanglingsu/vimb#129

9 years agoFixed misplaced hint labels on some sites (#232).
Daniel Carl [Tue, 28 Jul 2015 06:16:34 +0000 (08:16 +0200)]
Fixed misplaced hint labels on some sites (#232).

9 years agogive the focus to the text box after it's closed in an external editor
Benjamin Petrenko [Mon, 20 Jul 2015 17:55:00 +0000 (20:55 +0300)]
give the focus to the text box after it's closed in an external editor

9 years agostop the focus from appearing to be on the input box after closing an external editor
Benjamin Petrenko [Mon, 20 Jul 2015 11:48:33 +0000 (14:48 +0300)]
stop the focus from appearing to be on the input box after closing an external editor

9 years agoRemoved function from public scope.
Daniel Carl [Mon, 20 Jul 2015 10:54:26 +0000 (12:54 +0200)]
Removed function from public scope.

The function dom_auto_insert_unless_strict_focus was only used internal and
was really small, so the content was moved to the only placed where it was
called.
Also added a missed comment that might still be interesting.

9 years agogive the focus to an iframe when needed
Benjamin Petrenko [Mon, 20 Jul 2015 07:49:31 +0000 (10:49 +0300)]
give the focus to an iframe when needed

9 years agorespect the strict-focus variable
Benjamin Petrenko [Mon, 20 Jul 2015 07:08:02 +0000 (10:08 +0300)]
respect the strict-focus variable

9 years agoEnter the input mode at the right time
Benjamin Petrenko [Sun, 19 Jul 2015 08:00:52 +0000 (11:00 +0300)]
Enter the input mode at the right time

9 years agoESC deselects
Benjamin Petrenko [Sat, 18 Jul 2015 07:48:32 +0000 (10:48 +0300)]
ESC deselects

9 years agofix title after going back to a local file
Benjamin Petrenko [Fri, 17 Jul 2015 13:45:53 +0000 (16:45 +0300)]
fix title after going back to a local file

9 years agoMore consistent use of title and url (#224).
Daniel Carl [Fri, 17 Jul 2015 12:16:19 +0000 (14:16 +0200)]
More consistent use of title and url (#224).

There where cases where the title and the shown current url did not match the
expectations. For example if a page is opened the right title and url where
shown.
In case a none existing page was opened and another none existing page was
opened the title was set to the failed url. But if the user went back in
history the last failed url was still shown as title.

9 years agoFixed unset of current url on stop loading (#224).
Daniel Carl [Thu, 16 Jul 2015 21:13:50 +0000 (23:13 +0200)]
Fixed unset of current url on stop loading (#224).

If and url is loaded and the real url is already available in the webview the
provisional data sour seems to be not available anymore. This caused '(null)'
be shown in url bar in case a page loading was aborted by CTRL-C.
To fix this the provisional data source is used to get the current url as long
as it exists, else the webview's url is taken.

9 years agoUse provisional uri if page could not be loaded (#224).
Daniel Carl [Thu, 16 Jul 2015 20:40:06 +0000 (22:40 +0200)]
Use provisional uri if page could not be loaded (#224).

In case an uri could not be loaded the uri of the webview is still the
previous one. That means the url shown in the url bar is not the user
requested and the 'O' command would also use the wrong url.
To fix this the provisional uri is used for the url bar as well as for the
autocmd call if the load of the uri failed.

9 years agoFixed wrong order of blocks within ifeq-endif.
Daniel Carl [Sat, 27 Jun 2015 17:50:37 +0000 (19:50 +0200)]
Fixed wrong order of blocks within ifeq-endif.

9 years agoWrong order of blocks within ifeq-endif
Dmitrij D. Czarkoff [Thu, 25 Jun 2015 20:27:47 +0000 (22:27 +0200)]
Wrong order of blocks within ifeq-endif

9 years agoReplaced "-Wpedantic" with "-pedantic"
Dmitrij D. Czarkoff [Thu, 25 Jun 2015 20:06:48 +0000 (22:06 +0200)]
Replaced "-Wpedantic" with "-pedantic"

for compatibility with older GCC versions.

9 years agoMade build process more user-friendly
Dmitrij D. Czarkoff [Thu, 25 Jun 2015 10:43:24 +0000 (12:43 +0200)]
Made build process more user-friendly

Set CFLAGS that are not absolutely required with CFLAGS?=..., so that
user-defined CFLAGS take precedence.  Made VERBOSE option that would toggle
between silent (previous) and verbose mode of CC directive processing.

9 years agoAdded hint-number-same-length option
Yutao Yuan [Sat, 20 Jun 2015 13:34:53 +0000 (21:34 +0800)]
Added hint-number-same-length option

9 years agoFixed Makefile install target using -D.
Daniel Carl [Mon, 15 Jun 2015 13:44:26 +0000 (15:44 +0200)]
Fixed Makefile install target using -D.

Tanks to Leonardo Taccari for this patch. The -D option of install has a
different meaning in BSD, so we avoid it here.

9 years agoReleased version 2.10.
Daniel Carl [Sat, 13 Jun 2015 15:29:55 +0000 (17:29 +0200)]
Released version 2.10.

9 years agoMerge branch 'master' of https://github.com/jasonwryan/vimb
Daniel Carl [Sat, 23 May 2015 19:03:17 +0000 (21:03 +0200)]
Merge branch 'master' of https://github.com/jasonwryan/vimb

Conflicts:
README.md

9 years agoCleaned up typos and grammar in man page
Jason Ryan [Fri, 22 May 2015 22:46:52 +0000 (10:46 +1200)]
Cleaned up typos and grammar in man page

9 years agoGrammar and formatting cleanup in README
Jason Ryan [Fri, 22 May 2015 21:50:45 +0000 (09:50 +1200)]
Grammar and formatting cleanup in README

9 years agoREADME.md: config.h is under src/
Serge Hallyn [Sat, 9 May 2015 13:16:44 +0000 (08:16 -0500)]
README.md: config.h is under src/

Signed-off-by: Serge Hallyn <serge.hallyn@ubuntu.com>
9 years agoAllow to focus editable element in iframes (#201).
Daniel Carl [Mon, 27 Apr 2015 21:39:11 +0000 (23:39 +0200)]
Allow to focus editable element in iframes (#201).

This allows to use gi normal mode command to focus also editable element
within iframes in case the current document contains no editable element.

9 years agoFixed regression of ignored strict focus in frames (#201).
Daniel Carl [Mon, 27 Apr 2015 21:02:08 +0000 (23:02 +0200)]
Fixed regression of ignored strict focus in frames (#201).

9 years agoCheck for dom focus/blur event on window object cleared (#201).
Daniel Carl [Sun, 26 Apr 2015 21:30:36 +0000 (23:30 +0200)]
Check for dom focus/blur event on window object cleared (#201).

This allows us to track also focus changes within frames and iframes also  if
they are loaded dynamically. The previous logic added the event listeners to
the document on WEBKIT_LOAD_FINISHED, but if there where later created iframes
in the dom, these where not observers for focus events.
This is only a first attempt to fix the focus issue and does break the logic
behind `set strict-focus=on`.

9 years agoadd HTML5 input type to dom_focus_input
Sébastien Marie [Sun, 26 Apr 2015 10:39:44 +0000 (12:39 +0200)]
add HTML5 input type to dom_focus_input

Allow new HTML input type to be found by dom_focus_input as editable
field.

Reformat a little the xpath expression in order to have a lisible
string.

Close: #204

9 years agoAllow to use formfiller also for new html5 input types.
Daniel Carl [Thu, 23 Apr 2015 07:14:50 +0000 (09:14 +0200)]
Allow to use formfiller also for new html5 input types.

9 years agoFixed trailing whitespace.
Daniel Carl [Wed, 22 Apr 2015 18:11:47 +0000 (20:11 +0200)]
Fixed trailing whitespace.

9 years agosupport html5 new input types
Sébastien Marie [Wed, 22 Apr 2015 04:27:59 +0000 (06:27 +0200)]
support html5 new input types

mark new input types as editable, according to the way of webkit handle
these.

9 years agoSet focus also on htm5 input type="search".
Daniel Carl [Mon, 20 Apr 2015 20:35:18 +0000 (22:35 +0200)]
Set focus also on htm5 input type="search".

Allow to focus input type search on running normal mode command 'gi'.

9 years agoenable input-mode on input.search element
Sébastien Marie [Mon, 20 Apr 2015 15:46:29 +0000 (17:46 +0200)]
enable input-mode on input.search element

HTML5 define a new input type="search":
http://www.w3.org/TR/html-markup/input.search.html

declare this element to be editable, in order to switch in input-mode
when use it.

9 years agoMoved default hint css from js to config.def.h file (#199).
Daniel Carl [Sat, 18 Apr 2015 21:52:04 +0000 (23:52 +0200)]
Moved default hint css from js to config.def.h file (#199).

This makes it easier for user to adapt the hinting theme without the need to
overrule the style by style.css file or to patch the hints.js file.

9 years agoSuppress redefinition warning caused by glib.
Daniel Carl [Sat, 18 Apr 2015 20:36:02 +0000 (22:36 +0200)]
Suppress redefinition warning caused by glib.

9 years agoRemoved code to track clicks to input elements.
Daniel Carl [Mon, 6 Apr 2015 20:09:48 +0000 (22:09 +0200)]
Removed code to track clicks to input elements.

This was added to switch between input mode and normal mode, depending on the
clicked element. But the mode switching is done mainly by observing DOM
focus/blur events. So this duplicate logic become obsolete.

9 years agoFixed regression against 112-editable-focus.html test (#197).
Daniel Carl [Sun, 5 Apr 2015 21:43:49 +0000 (23:43 +0200)]
Fixed regression against 112-editable-focus.html test (#197).

9 years agoCheck for DOM focus/blur events as soon as possible (#197).
Daniel Carl [Sun, 5 Apr 2015 11:04:40 +0000 (13:04 +0200)]
Check for DOM focus/blur events as soon as possible (#197).

This is required to remove focus in strict-focus=true even when the focus is
set to an editable element before the page is completely loaded. The previous
logic caused the cursor to be visible in form filed but vimb where still in
normals mode.

9 years agoLeave input mode after submitting a form (#197).
Daniel Carl [Fri, 3 Apr 2015 21:15:48 +0000 (23:15 +0200)]
Leave input mode after submitting a form (#197).

This is required in cases where no focus/blur events are triggered after a
form was submitted. Else we'd end up with vimb keeping in input mode but none
focused editable element.

9 years agoFixed not leaved input mode on form submit (#197).
Daniel Carl [Fri, 3 Apr 2015 20:56:55 +0000 (22:56 +0200)]
Fixed not leaved input mode on form submit (#197).

The previous logic of switching back to normal mode in
webview_load_status_cb() does only work for google search or if the place
where we switch back to normal mode is change for translate.google.com. But
this would have never been working for both sites.

This patch tries another approach and doe the switching back to normal mode
also by observing dom events. In case the strict-focus is enabled the focus
event callback blur the active element to keep vimb in it's current mode. If
vimb is in input mode the focus is not removed from the element, which allows
to to keep in input mode if this was started by user interaction like 'gi'
normal mode command, hinting or click to editable element.

There are two way's to obtain the input mode.
1. By user interaction: where vimb is set to input mode and after that the
   form element is focused, or where the input mode is set right after the dom
   event observer took their decision.
2. By the page: Only the focus/blur state of the editable active element
   changes and vimb pick this state changes up and follows this, or remove the
   focus in case of enabled strict-focus.

9 years agoUse case insensitive xpath for focus input (#198).
Daniel Carl [Thu, 2 Apr 2015 20:37:39 +0000 (22:37 +0200)]
Use case insensitive xpath for focus input (#198).

9 years agoAdapted formfiller code style.
Daniel Carl [Thu, 19 Mar 2015 20:45:12 +0000 (21:45 +0100)]
Adapted formfiller code style.

9 years ago-z "$var" and not -z $var it would seem
Artymort [Thu, 19 Mar 2015 13:29:36 +0000 (13:29 +0000)]
-z "$var" and not -z $var it would seem

9 years agoSpace between l and 7 + default value for $XDG...
Artymort [Thu, 19 Mar 2015 13:15:32 +0000 (13:15 +0000)]
Space between l and 7 + default value for $XDG...

9 years agoAllow to escape escape char to in commands (#191).
Daniel Carl [Mon, 16 Mar 2015 21:13:20 +0000 (22:13 +0100)]
Allow to escape escape char to in commands (#191).

This patch fixes a misbehaviour in the way the escaping is done for commands
given via inputbox or config file. The previous logic for the lhs of a command
used '\' to escape the ' '. But to get a single '\' it's needed to use '\\'.
But the '\\' was not taken as a single backslash.
Now the backslash escapes ' ' as well as '\'. A backslash followed by any
other char is taken as is.

9 years agoUse URL for bookmark completion too (#189).
Daniel Carl [Wed, 11 Mar 2015 21:15:22 +0000 (22:15 +0100)]
Use URL for bookmark completion too (#189).

In case the bookmark has no tags, it was not possible to filter the generated
completion list. This patch allows to use the URL of the bookmark for the tag
matching in case no tags are available. This is done by splitting the URL on
'.' and '/' characters.

9 years agoAdded hint for bookmark file format (#189).
Daniel Carl [Tue, 10 Mar 2015 20:56:58 +0000 (21:56 +0100)]
Added hint for bookmark file format (#189).

9 years agoFix segfault on bookmark completion (#189).
Daniel Carl [Tue, 10 Mar 2015 20:41:11 +0000 (21:41 +0100)]
Fix segfault on bookmark completion (#189).

If the bookmark file contained lines without any tab char, the completion
caused a segfault.

9 years agoRemoved duplicate style override for GTK3.
Daniel Carl [Mon, 9 Mar 2015 23:33:23 +0000 (00:33 +0100)]
Removed duplicate style override for GTK3.

9 years agoRestore alphabetical order of settings in man page.
Daniel Carl [Mon, 9 Mar 2015 21:01:56 +0000 (22:01 +0100)]
Restore alphabetical order of settings in man page.

9 years agoFixed shown scrollbars on some sites (#188).
Daniel Carl [Mon, 9 Mar 2015 20:55:01 +0000 (21:55 +0100)]
Fixed shown scrollbars on some sites (#188).

9 years agoFix segfault on config file with invalid commands (#188).
Daniel Carl [Mon, 9 Mar 2015 20:43:37 +0000 (21:43 +0100)]
Fix segfault on config file with invalid commands (#188).

In case the file contained invalid commands, this was shown to the user by
using vb_echo() which writes the error message into the inpubox. But this
triggered the already buffer_changed_cb that delegated the changed buffer
event to the current mode.
Long story short, there was no current mode set before which caused the
segfault.