Zim

ZIM 0.65 Ctrl+Home didn`t work

Bug #1513766 reported by Максим Момот
44
This bug affects 8 people
Affects Status Importance Assigned to Milestone
Zim
Fix Released
Undecided
Unassigned

Bug Description

ZIM 0.64 Ctrl+Home - working well
ZIM 0.65 Ctrl+Home - didn`t work

Revision history for this message
walter dykas (dykaswp) wrote :

ctrl+end (end of page) - works in created notebook
ctrl+home (top of page) - doesn't work in created notebook, works the same as <home> (beginning of line)
ctrl+home (top of page) - seems to work in zim help notebook

Revision history for this message
japers (japers) wrote :

Recently upgraded to 0.65 in Debian testing and noticed this same issue.

Registered here so I could add a little information. The loss of function appears to be related to whether or not the notebook is editable. If it is editable, then <Ctrl>+<Home> doesn't take the cursor to the top of the page. If the notebook is readonly, then <Ctrl>+<Home> works as expected.

<Ctrl>+<R> will also take the cursor to the top of the page, whether or not the notebook is editable.

Hope this is of some help.

Revision history for this message
JP Vossen (jp-jpsdomain) wrote :

CTRL-R only reloads the page for me, it does not go to the top. I may have remapped that though, I forget. I was unable to find this bug at first and thus emailed the list with "CTRL-Home not working on 0.65?"

Revision history for this message
japers (japers) wrote :

Hi, JP.

I should have thought to investigate page reloading a little more thoroughly before posting.

Yes, <Ctrl>+<R> just reloads the page. If Zim's interface preferences are set to "Always use last cursor position when opening a page", the the cursor will remain where it was when the key combination was invoked. But if that setting in the preferences dialoag is UNchecked, then the cursor will jump to the top of the page.

Did you try setting a notebook to readonly to see if that restores the <Ctrl>+<Home> functionality? Just curious. I know it's not really a useful or convenient workaround for the problem.

Revision history for this message
JP Vossen (jp-jpsdomain) wrote :

I just tried and you are correct, making it read-only restores expected CTRL-Home behaviour. Your point about CTRL-R config makes sense as well; I have "Always use last cursor position when opening a page" checked as that is quite useful for me.

The things that jump out at from from the change log are:
=== 0.65 - Sun 01 Nov 2015 ===
* <Control> keybindings fail for older gtk versions, and in particular
  for the <Control><Space> keybinding

=== 0.64 - Tue 27 Oct 2015 ===
* Bug fix to avoid overwriting the accelmap config file

I did not use 0.64 because Jaap mentioned almost immediately that it had problems. I can't swear that I used 0.63, but I'm pretty sure that either 0.63 or 0.62 worked. BUT, OP said 0.64 worked and 0.65 does not, so...

Just for reference:
* 805 = Release 0.65
* 800 = Release 0.64
* 765 = 0.63?
* 736 = 0.62

In http://bazaar.launchpad.net/~jaap.karssenberg/zim/pyzim/revision/805?compare_revid=800 the big new block in "zim/actions.py" jumps out, as do some changes in "zim/gui/__init__.py" but I don't know enough Python or Zim guts to know for sure.

Revision history for this message
japers (japers) wrote :

The Zim version in Debian testing went from 0.63 directly to 0.65, so I never used the intermediate version. The <Ctrl>+<Home> combination worked properly for me in version 0.63, but it doesn't in 0.65.

Thank you very much for getting back to me to confirm my findings are present on other systems.

Perhaps our exchanges here will be helpful to Jaap and friends.

Revision history for this message
Sylvain Viart (sylvain-viart) wrote :

Is it unit testable ?

Revision history for this message
Pl (plprgt) wrote :

Took a look at the code.
It works in rev. 793, but not in rev. 794. It seems that this occured in 'pageview.py' during changing Ctrl key to Meta key. Adding back Ctrl check seems to solve this (see pageview1.diff, all attachments are compared to rev. 805).

Also replacing 'gtk.gdk.CONTROL_MASK' with 'gtk.gdk.META_MASK' in rev. 794 led to other changes. For example, placing the cursor to the beginning of the line and pressing Ctrl-Tab acts like Tab (changes in pageview2.diff return previous behaviour).

A small hack to use 'Ctrl+Home': try to select any text and then 'Ctrl+Home' should work.

Revision history for this message
Pl (plprgt) wrote :
Revision history for this message
JP Vossen (jp-jpsdomain) wrote :

Cool, those changes worked for me! I only did it 2 minutes ago so I'm not sure if there are adverse effects, but that fixed CTRL+Home behaviour for me on Linux (no clue about Mac). The work-around of selecting text then hitting CTRL+Home also worked on Linux.

Thanks!

Revision history for this message
Jaap Karssenberg (jaap.karssenberg) wrote :

Committed patches in rev814

Changed in zim:
status: New → Fix Committed
Revision history for this message
Sylvain Viart (sylvain-viart) wrote :

is it available somewhere?
I use this key short-cut really often.

Revision history for this message
Jaap Karssenberg (jaap.karssenberg) wrote : Re: [Bug 1513766] Re: ZIM 0.65 Ctrl+Home didn`t work

If you are on ubuntu you can install from the "daily" PPA. Otherwise it is
only availabe as source code. See instructions on the website.

Regards,

Jaap

On Fri, Feb 12, 2016 at 12:17 PM, Sylvain Viart <email address hidden>
wrote:

> is it available somewhere?
> I use this key short-cut really often.
>
> --
> You received this bug notification because you are subscribed to Zim.
> https://bugs.launchpad.net/bugs/1513766
>
> Title:
> ZIM 0.65 Ctrl+Home didn`t work
>
> To manage notifications about this bug go to:
> https://bugs.launchpad.net/zim/+bug/1513766/+subscriptions
>

Changed in zim:
status: Fix Committed → Fix Released
To post a comment you must log in.
This report contains Public information  
Everyone can see this information.

Other bug subscribers

Remote bug watches

Bug watches keep track of this bug in other bug trackers.