Paragraph split upon indentation not reflected in GUI

Reported by Fabian Stanke on 2010-05-27
18
This bug affects 3 people
Affects Status Importance Assigned to Milestone
Zim
High
Unassigned

Bug Description

Version: Zim 0.46, pyzim-trunk, revno 249
Running on Linux, gtk 2.20.1, pygtk 2.17.0

When part of an already indented paragraph is further indented by pressing tab, that part is split from the original paragraph to form a new paragraph with different indentation. The problem is, that this becomes visible to the user only after a reload of the page. The splitting of paragraphs inserts empty lines which are not shown immediately after the user interaction.

Take the following file (header cut, note the indentation):

    foo
    bar
    baz

Now if the user puts the cursor in front of the "bar" line and presses tab, the immediate result would suggest this:

    foo
     bar
    baz

What really happens is this:

    foo

     bar

    baz

But that only becomes visible after a reload of the page.

My suggestion is one of the two following solutions:
1) Immediately show the empty lines so that the user sees that the paragraph got split.
2) Or do not split the paragraph in the saved file and modify the parser to accept different indent levels within paragraphs

Related branches

lp:~fmos/zim/bugfixes
Merged into lp:zim at revision 549
Jaap Karssenberg: Pending requested 2012-05-18

Interesting...

If I create three lines

line one
line two
line three

then indent the middle line I get

line one
 line two
line three

in the display. Then hitting <Ctrl><r> shows me

line one
 line two

line three

So, I'm only seeing an empty line inserted between the second and third
lines.

Fabian Stanke (fmos) wrote :

Am 27.05.2010 13:44, schrieb Sam Snow:
> So, I'm only seeing an empty line inserted between the second and third
> lines.

You are right.

What happens, if you start with three indented lines and then give the
middle line an additional indent?

nomnex (nomnex) wrote :

That's exactly the bug topic I have opened here: https://bugs.launchpad.net/zim/+bug/580029

On 05/27/2010 08:01 AM, Fabian Moser wrote:
> What happens, if you start with three indented lines and then give the
> middle line an additional indent?

before:

 line one
 line two
 line three

after indenting middle line:

 line one
  line two
 line three

after reloading page:

 line one

  line two

 line three

Fabian Stanke (fmos) on 2010-05-28
description: updated
Changed in zim:
status: New → Confirmed
importance: Undecided → High
nomnex (nomnex) wrote :

Jaap, Is there a chance to have bug https://bugs.launchpad.net/zim/+bug/586296 already fixed on version 0.47 final?

I use Zim to learn HTML, and currently the tags look really awkward, see: sample HTML list + Verbatim formatting + Indents.png

Also, after this bug has been fixed, will I have to manually re-edit all the notes? Thanks

nomnex (nomnex) wrote :

Edit: the correct print screen for #5 is here

PS: Why Zim uses different Tab width indents with Normal formatting, and with Verbatim formatting? I mistakenly used the Normal formatting in the print screen above to write my list: Zim parses the indents with a tab with of maybe 6.
I used the Verbatim formatting in the second print screen: Zim parses the indent with a regular tab width indent of 2.

Is it by design or do I need to open a separate bug about Indents tab width with Normal formatting?

nomnex (nomnex) wrote :

I have opened a separate bug 586296 about the indent tab width between Normal formatting, and Verbatim formatting

nomnex (nomnex) wrote :

the correct reference for the separate bug is 589525, sorry about it.

On Fri, Jun 4, 2010 at 5:17 AM, nomnex <email address hidden> wrote:
> Jaap, Is there a chance to have bug
> https://bugs.launchpad.net/zim/+bug/586296 already fixed on version 0.47
> final?

I'm afraid not. I don't want to delay the release any more. Of course
we can have a new release in a few weeks when we have important fixes.
I rather release often than wait for all the fixes.

Regards,

Jaap

On Fri, 2010-06-04 at 08:38 +0000, Jaap Karssenberg wrote:
> On Fri, Jun 4, 2010 at 5:17 AM, nomnex <email address hidden> wrote:
> > Jaap, Is there a chance to have bug
> > https://bugs.launchpad.net/zim/+bug/586296 already fixed on version 0.47
> > final?
>
> I'm afraid not. I don't want to delay the release any more. Of course
> we can have a new release in a few weeks when we have important fixes.
> I rather release often than wait for all the fixes.
>
> Regards,
>
> Jaap
>

Okay, thanks Jaap. I guess I am stuck writing <tags> without indentation
and Verbatim formatting for the time being.

In progress, fixed for verbatim paragraphs in rev 300. Still open for normal paragraphs.

Changed in zim:
status: Confirmed → In Progress

Bundled this bug with bug #297932 since it is a closely related set of behavior.

To post a comment you must log in.
This report contains Public information  Edit
Everyone can see this information.

Other bug subscribers

Related blueprints