Fixed zathura going to first page when toggling index mode after using the inputbar

Andreas Hellquist requested to merge andreas/zathura:develop into develop

As described in this issue, zathura temporarily opens the first page of the document when toggling index mode after using the inputbar. To be honest I don't really understand why, but through logs and some guesswork, I found that the issue stems from this if statement. This merge request resolves the issue by resetting the adjust mode of the document when entering index mode.

While this works, and probably could be merged into zathura, there are two things I'm unsure about. The first is whether sc_toggle_index is a good function to put this type of check in. I assume the best would be to reset the adjustment mode directly after the inputbar loses it's focus, but I haven't found such a function. The other is whether the adjust mode should be reset to ZATHURA_ADJUST_NONE, or what is defined in the "adjust-open" setting. My understanding is that ZATHURA_ADJUST_NONE is better since it doesn't reset any actions such as zooming done by the user, but someone else probably knows this better than me.

Merge request reports