Skip to content

Tags: CodeEditApp/CodeEditSourceEditor

Tags

0.14.2

Toggle 0.14.2's commit message

Verified

This commit was created on GitHub.com and signed with GitHub’s verified signature.
Fix Bugs With Multiple Highlight Providers (#346)

### Description

Fixes a few issues when using multiple highlight providers.
- RangeStore did not clamp its output to only the requested range when
querying for runs in a specific range. This broke an assumption by the
styled store container, which broke the resulting highlighted ranges.
- Adds some randomized testing to the query method to ensure that
runtime contract is maintained.
- When reordering or adding new providers, their inferred priority would
be lost.

### Related Issues

* N/A

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

N/A

0.14.1

Toggle 0.14.1's commit message

Verified

This commit was created on GitHub.com and signed with GitHub’s verified signature.
Fix Style Store Crash (#345)

### Description

Fixes a crash when the styled range store has empty arrays and still
tries to remove values.

### Related Issues

N/A

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

N/A

0.14.0

Toggle 0.14.0's commit message

Verified

This commit was created on GitHub.com and signed with GitHub’s verified signature.
Code Folding (#341)

### Description

Adds a code folding ribbon.

> [!NOTE]
> For reviewers: Most of these changes have been reviewed individually
in separate PRs. This shouldn't require a detailed combing over. If you
can review a few things in particular like: architecture, naming, and
bugs with real use I think those would be the best use of your limited
time.

#### Detailed Changes
- Folding-related changes
- Added `FoldingRibbonView` - A view that draws a set of folding ranges.
This does all the drawing manually to avoid having to manage view reuse,
it does the drawing in the regions macOS designates so it only draws a
small part of the visible ribbon at a time.
- Added `LineFoldProvider` - A protocol for classes to provide fold
information to CodeEditSourceEditor. This takes a line number, range,
depth, and a reference to the text controller and returns a list of
'line info' objects.
- Added `LineIndentationFoldProvider`, an implementation of
`LineFoldProvider` that calculates folds based on the user's indent
setting.
- Added `LineFoldCalculator`, which interfaces with the given
`LineFoldProvider` to calculate new folds. This happens *asynchronously*
and recalculates every so often. It's very fast but stays off the main
thread to avoid ever gumming up the user's typing.
- Added `LineFoldingModel`, which is the glue between the text view,
calculator, and view.
- To display folded folds, we display a `LineFoldPlaceholder` in the
text view. This keeps a reference to the `LineFoldingModel` via a
delegate protocol to tell the model when it's dismissed.

<details><summary>This is a slightly complicated object graph, so I've
added a diagram here</summary>

```mermaid
flowchart TD
    TV["TextView"] -->|Text Updates| LFM["LineFoldingModel"]
    PL["LineFoldPlaceholder"] --> |Placeholder Removed| LFM
    LFM -->|Text Updates| LFC["LineFoldCalculator"]
    LFC -->|LineFoldStorage| LFM
    LFM -->|Storage Updated| FRV["FoldingRibbonView"]
    LFC <--> |Fold Info| LFP["any LineFoldProvider"]
```

</details>

- Gutter View changes
- New property `showFoldingRibbon` toggles the visibility of the folding
ribbon view.
  - The gutter now manages the folding ribbon view as a subview.
- Added an additional padding option on the gutter for the folding
ribbon.
- Makes a slight modification to how it draws line numbers by using a
line iterator in the drawn lines, rather than the 'visible lines'. Uses
less resources when macOS only requests a redraw for a specific rect
rather than the whole gutter.
- Other, related changes
- Modified the minimap. The minimap is now an attachment delegate to the
text view's attachment object. It receives updates to the text view's
attachments and adds a fake attachment to it's own layout manager. This
effectively syncs the text view's attachments to the minimap.
- Renamed `DispatchQueue.syncMainIfNot` to `waitMainIfNot` and updated
it to use a better method for waiting for a dispatched work item.
  - Added an extension to `NSBezierPath` for rounding corners.
- Added a new `NSColor` convenience initializer for creating light and
dark mode colors more easily.
- Moved the font character width calculation from `TextViewController`
to an `NSFont` extension.

### Related Issues

* #43 

### Checklist

- [x] Folds reflected in minimap.
- [x] Double-click fold expands it.
- [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/25e46ae4-3db5-4f08-8027-1fea9a8e64cb

---------

Co-authored-by: Austin Condiff <austin.condiff@gmail.com>

0.13.2

Toggle 0.13.2's commit message

Verified

This commit was created on GitHub.com and signed with GitHub’s verified signature.
[hotfix:] Use Correct Minimap Line Height (#321)

### Description

Updates the `MinimapLineRenderer` to have the correct protocol
parameters to correctly set it's customized layout information.

### Related Issues

N/A

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

0.13.1

Toggle 0.13.1's commit message

Verified

This commit was created on GitHub.com and signed with GitHub’s verified signature.
[chore:] Update CodeEditTextView to `0.11.0` (#318)

0.13.0

Toggle 0.13.0's commit message

Verified

This commit was created on GitHub.com and signed with GitHub’s verified signature.
Find: Replace and Match Case Toggle (#301)

### Description

This PR adds the following functionality to the source editor find
panel:
- Replace: Enables replacing matched text with the specified
replacement.
- Toggle Match Navigation Wrap-Around: Allows cycling through matches
from the beginning when reaching the end.
- Toggle Match Case: Adds an option to filter matches by case
sensitivity.
- Made find panel responsive at small sizes using `ViewThatFits`.

### Related Issues

* #295
* CodeEditApp/CodeEditTextView#1

### Checklist

<!--- Add things that are not yet implemented above -->

- [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/ec23ffe7-6d24-48b7-889a-11a92ec6c147


https://github.com/user-attachments/assets/cfca6d8e-7b97-4258-ae2e-ee82bbf6b9af

---------

Co-authored-by: Khan Winter <35942988+thecoolwinter@users.noreply.github.com>

0.12.0

Toggle 0.12.0's commit message

Verified

This commit was created on GitHub.com and signed with GitHub’s verified signature.
Fix Gutter Position On Small Documents (#312)

### Description

Fixes an issue where on small documents the text view / scroll view
would get messed up when placing the gutter view relative to the top
padding. This makes the y position relative to the text view's y
position.

### Related Issues

* N/A

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

Before, would only appear on small files (1-3 lines):

![Screenshot 2025-04-22 at 10 40
16 AM](https://github.com/user-attachments/assets/fbade1e5-200d-4e46-8b6a-bcd6145ec7b7)

After:

![Screenshot 2025-04-22 at 10 36
08 AM](https://github.com/user-attachments/assets/46963668-af4c-42f8-a83f-01c7404589bb)

0.11.0

Toggle 0.11.0's commit message

Verified

This commit was created on GitHub.com and signed with GitHub’s verified signature.
feat: Find in Editor (#295)

> [!IMPORTANT]
> ~~We need to merge
CodeEditApp/CodeEditTextView#78 before merging
this PR.~~

### Description

This PR introduces the initial implementation of the “Find in Editor”
feature for the source editor. Users can now search for text within the
currently open file using ⌘ F. All matching results are visually
emphasized, and users can navigate between matches using next/previous
controls.

What’s Included

- Text search across the current document
- Match highlighting with emphasis on the currently selected match
- Keyboard shortcut support: ⌘ F to activate the find bar
- Looping navigation with HUD notifications:
	- Reaching the end → loops to first result (arrow.triangle.capsulepath)
- Reaching the beginning → loops to last result (flipped
arrow.triangle.capsulepath)
	- No more matches → arrow.down.to.line HUD icon displayed

### Related Issues

- CodeEditApp/CodeEditTextView#1
- closes CodeEditApp/CodeEditTextView#3
- CodeEditApp/CodeEditTextView#78

* #ISSUE_NUMBER

### Checklist

<!--- Add things that are not yet implemented above -->

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

<!--- REQUIRED: if issue is UI related -->

<!--- IMPORTANT: Fill out all required fields. Otherwise we might close
this PR temporarily -->

---------

Co-authored-by: Khan Winter <35942988+thecoolwinter@users.noreply.github.com>
Co-authored-by: Austin Condiff <austin.condiff@gmail.com>

0.10.0

Toggle 0.10.0's commit message

Verified

This commit was created on GitHub.com and signed with GitHub’s verified signature.
Bump CETV, Revert Trailing Padding (#272) (#292)

0.9.1

Toggle 0.9.1's commit message

Verified

This commit was created on GitHub.com and signed with GitHub’s verified signature.
Fix `CaptureModifierSet.insert` (#281)

### Description

- Fixes a typo in `CaptureModifierSet` that `&=`'s the rawValue when
inserting instead of `|=`.
- Adds tests for the same type.

### Related Issues

* N/A

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