Zim

Spell correct removes formatting

Bug #691273 reported by dotancohen
34
This bug affects 7 people
Affects Status Importance Assigned to Milestone
Zim
Confirmed
Medium
Unassigned

Bug Description

When performing a spell check, correcting formatted words removes their formatting.

Steps to reproduce:
1) Type "Helo, world!"
2) Select and format as H1
3) Run spellcheck, correct Helo to Hello

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

I can not reproduce this error. Which version of zim are you using ?

Changed in zim:
status: New → Incomplete
Revision history for this message
dotancohen (dotancohen) wrote :

0.49

Interestingly, when I tried to reproduce the problem did not occur, I then performed Undo and tried replacing Helo with a different word and the bug reappeared. Strange, but if you cannot get the bug to occur then Undo (Ctrl-Z) and try a different replacement word.

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

Found this depends on the position of the cursor, if the cursor is on the word that should be replaced (or similar) it will keep the formatting, else it will loose it.

Not sure if this is something I can fix since the actions for spell checking are handled completely inside the gtkspell library, so there is no entry point were I can add a check for this.

Revision history for this message
Launchpad Janitor (janitor) wrote :

[Expired for Zim because there has been no activity for 60 days.]

Changed in zim:
status: Incomplete → Expired
Changed in zim:
status: Expired → New
Revision history for this message
zsquareplusc (zsquareplusc) wrote :

I also just saw this. The cursor was on the heading while i corrected an other word in normal text. The corrected word was formatted as heading.

Wouldn't this be easy to fix when the cursor would be placed to the point where the mouse was clicked to bring up the context menu? The other entries of the menu are populated by Zim itself and not the spell checker and it clearly is knowing where the click was when i look at the menu entries.

Right now, open and closing the context menu does not move the cursor. This isn't bad when no action was selected. Maybe there is a way to move the cursor only if an entry was chosen (incl. the spell check suggestions).

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

> Right now, open and closing the context menu does not move the cursor.
> This isn't bad when no action was selected. Maybe there is a way to move
> the cursor only if an entry was chosen (incl. the spell check suggestions).

This might be possible, but would require "hijacking" the menu items to insert an action before actually activating the original handler.

Not impossible, but tricky as we just get a bunch of menu items and we still don't know which one is which.

Changed in zim:
status: New → Incomplete
Revision history for this message
Launchpad Janitor (janitor) wrote :

[Expired for Zim because there has been no activity for 60 days.]

Changed in zim:
status: Incomplete → Expired
Changed in zim:
status: Expired → Confirmed
importance: Undecided → Low
Revision history for this message
Jaap Karssenberg (jaap.karssenberg) wrote :

Fix commited in rev485

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

Fixed in zim 0.55

Changed in zim:
status: Fix Committed → Fix Released
Revision history for this message
dotancohen (dotancohen) wrote :

I can still reproduce the issue in 0.55, Jaap. Make sure that the cursor is not on the word when you right-click it, you will see that the bug still exists.

Changed in zim:
status: Fix Released → Confirmed
Revision history for this message
JP Vossen (jp-jpsdomain) wrote :

Still present in 0.56 if the cursor is on a different line than the word you correct. If the cursor is on the same line but no the word you correct, it worked as expected.

Revision history for this message
dotancohen (dotancohen) wrote :

For the record, I just reproduced this in Zim 0.57 on Kubuntu Linux. As Vossen mentioned, the cursor was in fact on a different line than the word being corrected.

Revision history for this message
bakaniko (baka-niko) wrote :

Hi, I'm using Zim 0.60 on ubuntu 14.04.

This bugs disturbs me each time I want to correct a title.

I used to type text, apply format then correct. There is anything you can do ?

Thanks

Nicolas

Revision history for this message
Jaap Karssenberg (jaap.karssenberg) wrote :
Changed in zim:
importance: Low → Medium
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.