Zim

code blocks fail and makes zim instable

Bug #1652940 reported by lalebarde
6
This bug affects 1 person
Affects Status Importance Assigned to Milestone
Zim
New
Undecided
Unassigned

Bug Description

When I try to use code blocks, it works find while I remain in the same page. Syntax highlighting works. As soon as I change page and back, syntax highlighting does not work any more and zim is unstable. For example, clicking on a menu opens it, but it never closes, whatever I do. I cannot edit any page. I have to quit zim, edit the file to suppress the code block by hand, and it works well again.

Here, I have used zim 0.65. I have also tested 0.62 from Debian Jessie repository. The bug is the same with a small difference, in 0.62, the code block squeezes from right to left letting only one character wide visible.

Included in the 7z archive:
  - a zim -D session including the add of a code block, then go to another vim page and back.
  - snapshot of the code block at creation
  - snapshot of the code block when back to the page
  - zim crash
-------------------------------------------------------------------------------------------
$ zim -D
INFO: This is zim 0.65
DEBUG: Python version is sys.version_info(major=2, minor=7, micro=9, releaselevel='final', serial=0)
DEBUG: Platform is posix
DEBUG: Zim revision is:
  branch: zim-trunk
  revision: 805 <email address hidden>
  date: 2015-11-01 15:42:45 +0100

Revision history for this message
lalebarde (l-alebarde) wrote :
Revision history for this message
lalebarde (l-alebarde) wrote :
Revision history for this message
lalebarde (l-alebarde) wrote :

I forgot to put in the archive the page:

test_code.txt
Content-Type: text/x-zim-wiki
Wiki-Format: zim 0.4
Creation-Date: 2016-12-28T14:18:45+01:00

====== test code ======
Created mercredi 28 décembre 2016

blabla

{{{code: lang="cpp" linenumbers="True"
#define glop 1
int a = 0
}}}

blabla

Revision history for this message
lalebarde (l-alebarde) wrote :

Reading the other posts and testing, turning off the line numbering solves the issue.

Revision history for this message
Wolfram Wong (wolframy) wrote :

Hi lalebarde,

I had the same problem. When I add a code block, the snippets dispalys as expected. But after I close zim and restart it, the code block displays as '{{{code ....}}}'. I have tried to trun off "show line numbers", the problem remains. Final, I changed the source view configuration in Edit->Preferences->Plugins->Source View->cofigure, disable "Show right margin" feature, and the code block dispalys back, everything sames all right. :)

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.