Skip to content
Permalink

Comparing changes

Choose two branches to see what’s changed or to start a new pull request. If you need to, you can also or learn more about diff comparisons.

Open a pull request

Create a new pull request by comparing changes across two branches. If you need to, you can also . Learn more about diff comparisons here.
base repository: CodeEditApp/CodeEditTextView
Failed to load repositories. Confirm that selected base ref is valid, then try again.
Loading
base: 0.11.2
Choose a base ref
...
head repository: CodeEditApp/CodeEditTextView
Failed to load repositories. Confirm that selected head ref is valid, then try again.
Loading
compare: 0.11.3
Choose a head ref
  • 7 commits
  • 21 files changed
  • 1 contributor

Commits on Jun 18, 2025

  1. Merge Trailing Line on Attachments, Select Attachments (#98)

    ### Description
    
    Fixes a bug with text attachments that ended on the newline character in a line. Eg:
    ```
    A
    B
    ```
    Text attachment added for range (0..<2) should result in:
    ```
    [Attachment]B
    ```
    
    Right now it results in the following visible lines.
    ```
    [Attachment]B
    
    ```
    
    Also introduces the ability for text attachments to respond to being selected and draw their contents differently.
    
    ### Related Issues
    
    * CodeEditApp/CodeEditSourceEditor#43
    
    ### Checklist
    
    - [x] I read and understood the [contributing guide](https://github.com/CodeEditApp/CodeEdit/blob/main/CONTRIBUTING.md) as well as the [code of conduct](https://github.com/CodeEditApp/CodeEdit/blob/main/CODE_OF_CONDUCT.md)
    - [x] The issues this PR addresses are related to each other
    - [x] My changes generate no new warnings
    - [x] My code builds and runs on my machine
    - [x] My changes are all related to the related issue above
    - [x] I documented my code
    
    ### Screenshots
    
    With new behavior:
    
    https://github.com/user-attachments/assets/3cf665ab-1a9a-4de0-a835-9248d955ab5a
    thecoolwinter authored Jun 18, 2025
    Configuration menu
    Copy the full SHA
    2508635 View commit details
    Browse the repository at this point in the history
  2. NSBeep On Empty Undo, Remove Unnecessary Redirection (#102)

    ### Description
    
    - When the undo or redo stack is empty, and the user tries to undo or redo, plays the beep sound.
    - Removes the (now) unnecessary `DelegatedUndoManager` type that sent messages to the `CEUndoManager` type. This was a holdover from when we did not have a custom text view.
      - Made `CEUndoManager` a subclass of `UndoManager`
      - Added more overrides to more correctly conform to the `UndoManager` class.
    
    ### Related Issues
    
    * closes #89
    
    ### Checklist
    
    - [x] I read and understood the [contributing guide](https://github.com/CodeEditApp/CodeEdit/blob/main/CONTRIBUTING.md) as well as the [code of conduct](https://github.com/CodeEditApp/CodeEdit/blob/main/CODE_OF_CONDUCT.md)
    - [x] The issues this PR addresses are related to each other
    - [x] My changes generate no new warnings
    - [x] My code builds and runs on my machine
    - [x] My changes are all related to the related issue above
    - [x] I documented my code
    
    ### Screenshots
    thecoolwinter authored Jun 18, 2025
    Configuration menu
    Copy the full SHA
    c127b47 View commit details
    Browse the repository at this point in the history
  3. Correctly Group Drag-and-drop for Undo (#104)

    ### Description
    
    Moves the `endUndoGrouping` call to the end of the actual editing operation when dropping text. Makes it so only one undo command is needed to undo a drag-and-drop operation.
    
    ### Related Issues
    
    * closes #99
    
    ### Checklist
    
    - [x] I read and understood the [contributing guide](https://github.com/CodeEditApp/CodeEdit/blob/main/CONTRIBUTING.md) as well as the [code of conduct](https://github.com/CodeEditApp/CodeEdit/blob/main/CODE_OF_CONDUCT.md)
    - [x] The issues this PR addresses are related to each other
    - [x] My changes generate no new warnings
    - [x] My code builds and runs on my machine
    - [x] My changes are all related to the related issue above
    - [x] I documented my code
    
    ### Screenshots
    
    
    https://github.com/user-attachments/assets/35952874-6d4d-4702-b149-f06b9ffb5226
    thecoolwinter authored Jun 18, 2025
    Configuration menu
    Copy the full SHA
    a8a0e9c View commit details
    Browse the repository at this point in the history
  4. Select Undone/Redone Text (#105)

    ### Description
    
    Updates the undo manager to update the text selection when undoing/redoing.
    
    Two cases:
    - Replaced/Inserted text - selects the inserted text
    - Deleted text - Places cursor at the start of the deleted text, as if the user had just deleted it.
    
    ### Related Issues
    
    * closes #95
    
    ### Checklist
    
    - [x] I read and understood the [contributing guide](https://github.com/CodeEditApp/CodeEdit/blob/main/CONTRIBUTING.md) as well as the [code of conduct](https://github.com/CodeEditApp/CodeEdit/blob/main/CODE_OF_CONDUCT.md)
    - [x] The issues this PR addresses are related to each other
    - [x] My changes generate no new warnings
    - [x] My code builds and runs on my machine
    - [x] My changes are all related to the related issue above
    - [x] I documented my code
    
    ### Screenshots
    
    
    https://github.com/user-attachments/assets/55309316-9106-4ce2-ac25-952e2addbbfe
    thecoolwinter authored Jun 18, 2025
    Configuration menu
    Copy the full SHA
    7d63a64 View commit details
    Browse the repository at this point in the history

Commits on Jun 19, 2025

  1. Fix Cursor Lagging - Update Cursors in TextView.layout (#109)

    ### Description
    
    Addresses an issue described by @nkleemann in the linked issue. The issue was a bug where cursors would lag behind an edit. This is due to the edited line's layout information being invalidated by the edit, meaning the selection manager cannot get valid layout information to position cursors.
    
    This change puts a selection position update in the text view's `layout` call, after the layout manager has done it's layout pass. This ensures the selection manage is using valid layout information, fixing the lagging issue.
    
    ### Related Issues
    
    * CodeEditApp/CodeEditSourceEditor#317
    
    ### Checklist
    
    - [x] I read and understood the [contributing guide](https://github.com/CodeEditApp/CodeEdit/blob/main/CONTRIBUTING.md) as well as the [code of conduct](https://github.com/CodeEditApp/CodeEdit/blob/main/CODE_OF_CONDUCT.md)
    - [x] The issues this PR addresses are related to each other
    - [x] My changes generate no new warnings
    - [x] My code builds and runs on my machine
    - [x] My changes are all related to the related issue above
    - [x] I documented my code
    
    ### Screenshots
    
    On v0.11.2:
    
    https://github.com/user-attachments/assets/f4f23e02-58e5-410b-ba1a-0ea5e449dce4
    
    With this change:
    
    https://github.com/user-attachments/assets/663fdecb-c1dd-43ec-9990-5f8c7da07205
    thecoolwinter authored Jun 19, 2025
    Configuration menu
    Copy the full SHA
    48cef38 View commit details
    Browse the repository at this point in the history

Commits on Jun 23, 2025

  1. Column Selection (#107)

    ### Description
    
    Adds column selection when pressing option and dragging to select.
    
    ### Related Issues
    
    * #46
    
    ### Checklist
    
    - [x] I read and understood the [contributing guide](https://github.com/CodeEditApp/CodeEdit/blob/main/CONTRIBUTING.md) as well as the [code of conduct](https://github.com/CodeEditApp/CodeEdit/blob/main/CODE_OF_CONDUCT.md)
    - [x] The issues this PR addresses are related to each other
    - [x] My changes generate no new warnings
    - [x] My code builds and runs on my machine
    - [x] My changes are all related to the related issue above
    - [x] I documented my code
    
    ### Screenshots
    
    Demo, ignore the multiple undos at the end a fix for that is on it's way.
    
    https://github.com/user-attachments/assets/409aa49c-eed2-465f-a964-162920c8877d
    thecoolwinter authored Jun 23, 2025
    Configuration menu
    Copy the full SHA
    3f96de5 View commit details
    Browse the repository at this point in the history
  2. Track Mouse Drag Outside View (#108)

    ### Description
    
    Fixes a bug that didn't allow the view to track drags outside it's bounds. Users can now drag selections over other views and outside the window.
    
    ### Related Issues
    
    * closes #100
    * closes CodeEditApp/CodeEditSourceEditor#316
    
    ### Checklist
    
    - [x] I read and understood the [contributing guide](https://github.com/CodeEditApp/CodeEdit/blob/main/CONTRIBUTING.md) as well as the [code of conduct](https://github.com/CodeEditApp/CodeEdit/blob/main/CODE_OF_CONDUCT.md)
    - [x] The issues this PR addresses are related to each other
    - [x] My changes generate no new warnings
    - [x] My code builds and runs on my machine
    - [x] My changes are all related to the related issue above
    - [x] I documented my code
    
    ### Screenshots
    
    https://github.com/user-attachments/assets/ffbad5bf-5a56-4ef8-91f7-c5a9bb725208
    thecoolwinter authored Jun 23, 2025
    Configuration menu
    Copy the full SHA
    df485cb View commit details
    Browse the repository at this point in the history
Loading