Zim

[pyzim] Last line tab does not indent properly.

Bug #506818 reported by Tom Eubank
8
This bug affects 1 person
Affects Status Importance Assigned to Milestone
Zim
Fix Released
Low
Unassigned

Bug Description

Tab key does not indent properly when entered on last line of page text.

To reproduce:
  1. Press Ctrl-End. If there is text on the same line prior to the cursor, press Enter.
  2. Press Tab.

 Result: Nothing happens. (The cursor should move to the right, at the beginning of a new indented paragraph.)

================================================================================================
Linux version 2.6.31-17-generic (buildd@palmer) (gcc version 4.4.1 (Ubuntu 4.4.1-4ubuntu8) ) #54-Ubuntu SMP Thu Dec 10 16:20:31 UTC 2009

gtkversion.h:
     #define GTK_MAJOR_VERSION (2)
     #define GTK_MINOR_VERSION (18)
     #define GTK_MICRO_VERSION (3)
     #define GTK_BINARY_AGE (1803)
     #define GTK_INTERFACE_AGE (3)

pygtk._get_available_versions(): {'2.0': '/usr/lib/python2.6/dist-packages/gtk-2.0'}

INFO: This is zim 0.42
DEBUG: Python version is (2, 6, 4, 'final', 0)
DEBUG: Zim revision is:
 branch: pyzim-trunk
 revision: 181 <email address hidden>
 date: 2010-01-10 23:00:57 +0100

DEBUG: Running from a source dir: /opt/download/python_packages/zim-0.42
DEBUG: Set XDG_DATA_HOME to /home/USERNAME/.local/share
DEBUG: Set XDG_DATA_DIRS to [<Dir: /opt/download/python_packages/zim-0.42>, <Dir: /usr/local/share>, <Dir: /usr/share>]
DEBUG: Set XDG_CONFIG_HOME to /home/USERNAME/.config
DEBUG: Set XDG_CONFIG_DIRS to [<Dir: /etc/xdg>]
DEBUG: Set XDG_CACHE_HOME to /home/USERNAME/.cache
DEBUG: Running command: gui
DEBUG: Cache dir: /home/USERNAME/data/zim/.zim
DEBUG: Index database file: /home/USERNAME/data/zim/.zim/index.db
TODO: hook slow_fs property
INFO: Opening default notebook
DEBUG: Sending to daemon: ["ping",[],{}]

DEBUG: Daemon replied: "Ack"
DEBUG: Sending to daemon: ["vivicate",["zim.gui.GtkInterface","file:///home/USERNAME/data/zim"],{"usedaemon":true,"notebook":"file:///home/USERNAME/data/zim"}]

DEBUG: Daemon replied: true
DEBUG: Sending to daemon: ["relay",[["zim.gui.GtkInterface","file:///home/USERNAME/data/zim"],"present",null],{"geometry":null,"fullscreen":null}]

DEBUG: Daemon replied: true

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

Fix committed in rev184

Changed in zim:
status: New → Fix Committed
Revision history for this message
Jaap Karssenberg (jaap.karssenberg) wrote :

Fix reverted in rev186 because it conflicts with inserting a bullet at the end of a buffer - see bug #507372.

This can be fixed by splitting up tags used for formatting bullet list and tags formatting indenting.

Changed in zim:
status: Fix Committed → Confirmed
importance: Undecided → Low
Revision history for this message
Thomas Liebetraut (tommie-lie) wrote :

The attached patch fixes the problem when hitting <Tab> on the last line of the note but does not show behavior as in bug #507372.

However, there is a line added after the current (then indented) line. Setting the cursor there and starting to type will immediately indent this line. This seems to be consistent with indentation that is not at the end of the note, though (is this a new bug or intended behavior?).

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

Will commit patch in rev295.

Behavior where indent is not visible before typing some content is essentially due to gtk pageview operation with tags. This causes indentation only to be visible when it spans either some content or at least a \n. We can try to fix some cases where results are confusing to users, but edge cases will remain where an indent tag is active that is not directly visible.

Since this patch fixes the specific case described in this report we can consider it a solution.

Changed in zim:
status: Confirmed → Fix Committed
Revision history for this message
Jaap Karssenberg (jaap.karssenberg) wrote :

Released in 0.49

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.