jacquesh / foo_openlyrics

An open-source lyric display panel for foobar2000
MIT License
449 stars 26 forks source link

Two Enter keystrokes being save as Enter > Spacebar > Enter #374

Closed ghost closed 2 months ago

ghost commented 4 months ago

Upon saving lyrics using the built-in editor, any keystrokes that were originally entered as Enter > Enter (to create a paragraph break), are being saved as Enter > Spacebar > Enter. This leaves a single, selectable space in the paragraph break

Steps to reproduce

  1. Type verse 1
  2. Press Enter key twice
  3. Type verse 2
  4. Press Okay to save lyrics
  5. Open Lyrics Editor again
  6. Highlight all text using Ctrl+A
  7. Single spacebar strokes will be visible and selected at any and all paragraph breaks

Expected behavior

Paragraph breaks should exist, but there should not be a selectable Spacebar stroke present

Versions

Debug logs

Additional information

jacquesh commented 4 months ago

This is intended behaviour because without the extra spaces there would be nothing to highlight on the empty lines, so when syncing lines it would appear at least a little broken.

We could probably construct some more complicated solution that achieved this without the extra spaces in the editor but...is it a problem? I guess its confusing either way, the question is whether the extra complication of whatever the more complicated solution is, is worth the benefit of not having spaces shown in place of empty lines in the editor.