Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Undo/redo doesn't work in headers #520

Closed
szotsaki opened this issue Feb 13, 2017 · 17 comments
Closed

Undo/redo doesn't work in headers #520

szotsaki opened this issue Feb 13, 2017 · 17 comments
Milestone

Comments

@szotsaki
Copy link

  1. Create a new note and type in a new header (like ## My header)
  2. Press Ctrl+Z to undo the last typed word (ḣeader).

Ctrl+Z doesn't work in this case.

@pbek
Copy link
Owner

pbek commented Feb 13, 2017

I cannot reproduce that.
Maybe your note folder (and the note with it) got reloaded, then of course there wouldn't be a history in the note text edit...

Can you please post the output from the debug settings and maybe some log output if you enable the log widget.

@szotsaki
Copy link
Author

I can reproduce it in any new note as well.

  1. Have a new note in a subdirectory named „Gépi tanulás”
  2. Paste the following into the note:
Note 2017-02-15T09.23.53
========================

### asdasdasd
  1. Add some letters after „asdasd” and try to Ctrl+Z it.

I don't see anything in the log window. Debug output is in issue #516.

@pbek
Copy link
Owner

pbek commented Feb 15, 2017

I can confirm that undo doesn't work in headlines that start with #. No new note or sub-folders are needed to test this. Headlines like

Note 2017-02-13T12.38.0
========================

work for me.
So far I've no idea what is causing this.

@pbek
Copy link
Owner

pbek commented Feb 18, 2017

I've still no idea, since the undo process is controlled by the QTextEdit.

@pbek
Copy link
Owner

pbek commented Mar 12, 2017

It is caused by setting a block format to the headlines in MarkdownHighlighter::setCurrentBlockMargin. Could be a Qt bug...

@bepolymathe
Copy link

This problem has been solved. It works fine for me.

@pbek
Copy link
Owner

pbek commented Jul 28, 2017

I still have the same problem. @bepolymathe, can you please post your first block of the QOwnNotes Debug Information from the Debug settings to let me see what system you are using?.

@pbek
Copy link
Owner

pbek commented Jul 28, 2017

I've:

General Info

Version: 17.07.7
Build date: Jul 26 2017
Build number: 359
Platform: linux
Operating System: KDE neon User Edition 5.10
Build architecture: x86_64
Current architecture: x86_64
Release: Launchpad PPA
Qt Version (build): 5.5.1
Qt Version (runtime): 5.9.1
Portable mode: no
Qt Debug: 0
Locale (system): en_US
Locale (interface): en

@bepolymathe
Copy link

bepolymathe commented Jul 28, 2017

Hi @pbek

I have this :

General Info

Current Date: ven. juil. 28 09:29:00 2017
Version: 17.07.7
Build date: Jul 26 2017
Build number: 359
Platform: linux
Operating System: Fedora 26 (Workstation Edition)
Build architecture: x86_64
Current architecture: x86_64
Release: OBS
Qt Version (build): 5.7.1
Qt Version (runtime): 5.7.1
Portable mode: no
Qt Debug: 0
Locale (system): fr_FR
Locale (interface): empty
Icon theme: Adwaita
Notes in current note folder: 20
Enabled scripts: 4

@bepolymathe
Copy link

Different Qt Version...

@pbek
Copy link
Owner

pbek commented Jul 28, 2017

But it neither works for me on:

General Info

Version: 17.07.7
Build date: Jul 26 2017
Build number: 3114
Platform: macosx
Operating System: macOS Sierra (10.12)
Build architecture: x86_64
Current architecture: x86_64
Release: Travis CI
Qt Version (build): 5.9.1
Qt Version (runtime): 5.9.1
Portable mode: no
Qt Debug: 0

@bepolymathe
Copy link

It's strange.

@florianklumb
Copy link

I experience the same.

QOwnNotes Debug Information

General Info

Current Date: Mo Aug 14 12:53:03 2017
Version: 17.08.4
Build date: Aug 13 2017
Build number: 3160
Platform: windows
Operating System: Windows 7 SP 1
Build architecture: i386
Current architecture: x86_64
Release: AppVeyor
Qt Version (build): 5.7.1
Qt Version (runtime): 5.7.1
Portable mode: no
Settings path / key: \HKEY_CURRENT_USER\Software\PBE\QOwnNotes
Application database path: C:\Users\LENOVO\AppData\Roaming\PBE\QOwnNotes\QOwnNotes.sqlite
Application arguments: E:\Programs\PortableApps\QOwnNotes\QOwnNotes.exe
Qt Debug: 0
Locale (system): de_DE
Locale (interface): empty
Icon theme: breeze-qownnotes
Notes in current note folder: 108
Enabled scripts: 0

@pbek
Copy link
Owner

pbek commented Sep 1, 2017

17.09.0

  • margins for headlines in the note editor are now disabled, because Qt bugs
    are causing multiple problems with them
    • they prevent "undo" in headlines
      (for Issue #520)
    • they generate invisible lines at the end of a note
      (for Issue #667)
    • the cause a crash when reaching the invisible lines when highlighting of
      the current line is turned on (for Issue #701)

@pbek pbek added this to the 17.09.0 milestone Sep 1, 2017
@pbek
Copy link
Owner

pbek commented Sep 1, 2017

There now is a new release, could you please test it and report if it works for you?

@ludenticus
Copy link
Contributor

I've tested release 17.09.0, and it solves this issue. Only caveat: Ctrl + Z undoes a whole line. I can't recollect if this was the standard behavior

@pbek
Copy link
Owner

pbek commented Sep 1, 2017

Great, thank you for testing!
I can't control the actual undo-mechanism of the QTextEdit, that is done by Qt internally.

@pbek pbek closed this as completed Sep 1, 2017
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

5 participants