Empty list items disappearing when flipping pages

Reported by dotancohen on 2010-02-27
16
This bug affects 3 people
Affects Status Importance Assigned to Milestone
Zim
Medium
Unassigned
zim (Debian)
New
Undecided
Unassigned

Bug Description

To reproduce:
1) Enter this into a page in Zim:
"""
[] One
[]
[] Three
"""
2) Change to another page, change back

See that the second line is missing.

Zim 0.44, Kubuntu 9.10

This was known behavior for me. Guess you have a point this can be considered a bug.

Changed in zim:
status: New → Confirmed
importance: Undecided → Medium
Oliver Joos (oliver-joos) wrote :

I just stumbled over this "bug" in rev249 (25.5.2010). Even removing the [] from the empty line does not help. Only after pressing Enter twice followed by one Backspace the empty line stays.

I could agree to declare this behavior as intended. This prevents lists (checkboxed, bulleted, numbered in the future?) from breaking apart easily. But without any visual marking users have no clue why their empty line is not taken seriously. As an alternative to changing behavior I propose to mark each list, e.g. by a vertical bar just left of the text frame:

| [x] list1-line1
| [x] list1-line2
|
| [x] list1-line3

| [x] list2-line1
| [x] list2-line2

This way the first empty line is obviously part of the first list and will disappear if it does not contain anything. Whereas the second empty line is not member of a list and stays. Perhaps there are easier ways to implement such markings (changed background color like for verbatim blocks?).

dotancohen (dotancohen) wrote :

> I could agree to declare this behavior as intended. This prevents
> lists (checkboxed, bulleted, numbered in the future?) from breaking
> apart easily.

Breaking apart? Please elaborate on that, I do not understand the potential problem that you describe.

Oliver Joos (oliver-joos) wrote :

Ok, mostly it's obvious where a list ends. Here is an example where manual indentation makes it hard to see that there are two lists. See the attachment: it looks like one list with 3 entries. But in the file or when export it (e.g. as html) you see that it is "broken apart".
The source file looks like this:
* list1-line1: ntrsg sg sgsg sfgdg dgh dfghe rth ethe trherth erth erth rtherth erth
* list1-line2: sgewrg
   ssgfgs sgherth
* list2-line1!

Similarly a user might try to arrange a "bigger" list by inserting empty lines. But zim won't be able to distinguish it from three lists with one entry each. (I'd also call this list "broken apart"):
* list1

* list2

* list3

dotancohen (dotancohen) wrote :

Oliver, put a blank line between your lists. The same argument could be made for having two paragraphs or even two images one after the other.

Back to the issue at hand:
If the user has this list:
[] item one
[]
[] item three

Then when he switches to another page and back, he show see this:
[] item one
[]
[] item three

Currently, he sees this:
[] item one
[] item three

That is wrong, the user intentionally left an empty list item, possibly to paste into it the info that he pulled out of the other page. No matter what the reason, that item should not disappear.

Thanks.

Oliver Joos (oliver-joos) wrote :

Ok, I agree. It's wrong when zim removes a "[] " without text behind.

Sorry for my perplexing attempt to justify the current behavior. I was surprised that even removing the "[] " (leaving just a blank line) does not help. The blank line disappears too! Then I read Jaaps comment #1 and thought about why this could be a "known behavior". IMHO the intention could be that a list is not separated into two by accident.

If we see lists like paragraphs (as you wrote) then it's easy: a list may contain a "[] " without text behind, but not a completely blank line. Two lists must be separated by at least one line without a preceding "[] ".

What I fear is that fixing this bug could lead to more similar questions. E.g.: if you enter "[] Hello", then remove the space, then leave and re-open the page, zim inserts the space again! Isn't that another bug? A matter of opinion, I guess. As far as I'm concerned, I don't like automatic helpers like this.

tags: added: papercut
tags: added: parsetree
Johann Glaser (johann-glaser) wrote :

even in newest version 0.60-1

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

Other bug subscribers

Bug attachments