Spell correct removes formatting

Reported by dotancohen on 2010-12-16
30
This bug affects 6 people
Affects Status Importance Assigned to Milestone
Zim
Low
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

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

Changed in zim:
status: New → Incomplete
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.

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.

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
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).

> 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
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

Fix commited in rev485

Changed in zim:
status: Confirmed → Fix Committed

Fixed in zim 0.55

Changed in zim:
status: Fix Committed → Fix Released
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
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.

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.

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

Other bug subscribers