Skip to content

Move Selected Line Up Display bug #1987

Closed

Description

@tlrand

Description

Moving a line up through another line with different formatting will change the formatting of the line in the editor display. This does not happen when moving a line down. The problem is a cosmetic annoyance as re-opening the document corrects the formatting.

To Reproduce

  1. Create a simple document with an H2 header in the body and a line of text below the header.
Image
  1. Select the line of text and use option-command-up arrow to move the text to above the header. (Menu Format/Move Item/Move Selected Lines Up). The line of text now changes formatting to a non-bolded version of the header.
Image

Expected behavior

Formatting should not change with line moves. The incorrect formatting does not persist after re-opening the document.

FSNotes version

Version 7.3.1 (715)

macOS/iOS version

Tahoe 26.6

Additional context

An annoyance mostly, but it is annoying and shows a potential problem with how in-editor rendering is done.

Activity

  1. EhsanAzish80 commented on Aug 10, 2026

    @EhsanAzish80
    Contributor

    I traced this to an inconsistency between the two line-move operations. Moving down replaces the attributed content directly in textStorage, while moving up sends it through insertText, which reapplies editor attributes and causes the temporary formatting change. I have a one-line fix that makes moving up use the same attributed replacement path. The macOS app builds successfully with the change.

  2. glushchenko commented on Aug 17, 2026

    @glushchenko
    Owner

    Merged. @EhsanAzish80 @tlrand thanks for contribution!

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

No one assigned

    Labels

    Type

    No type

    Projects

    No projects

      Milestone

      No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions