• Home
  • Features
  • Pricing
  • Docs
  • Announcements
  • Sign In

rm-hull / git-commit-summary / 26337754780

23 May 2026 04:25PM UTC coverage: 31.676% (-0.8%) from 32.453%
26337754780

push

github

web-flow
feat: implement Ctrl+X to cut lines in commit view (#39)

* feat: implement Ctrl+X to cut lines in commit view

Adds a keyboard shortcut (`Ctrl+X`) to the commit view that cuts the
current line and copies it to the system clipboard.

- Integrates `github.com/atotto/clipboard` for system access.
- Removes the active line from the textarea buffer.
- Records the change in the history buffer for undo support.
- Recalculates the cursor offset to maintain focus on the following
  line.

```mermaid
graph TD
    A[Press Ctrl+X] --> B{Textarea empty?}
    B -- No --> C[Identify current line]
    C --> D[Copy line to clipboard]
    D --> E[Remove line from buffer]
    E --> F[Push state to history]
    F --> G[Update cursor position]
    B -- Yes --> H[Ignore]
```

* chore: update dependencies in go.mod

- Remove unused `github.com/atotto/clipboard`.
- Update `charmbracelet/x/exp/slice` to latest patch.
- Update `genproto/googleapis/rpc` to latest patch.

* fix: improve line cut functionality in commit view

- Ensure the textarea is focused before performing a cut.
- Include newline characters when copying lines to the clipboard.
- Handle potential clipboard write errors.
- Correctly restore the cursor position after removing a line.

* refactor: simplify commit view navigation logic

- Remove redundant textarea focus calls.
- Fix index out-of-bounds check when committing an empty or single-line
  message.

0 of 26 new or added lines in 1 file covered. (0.0%)

344 of 1086 relevant lines covered (31.68%)

0.34 hits per line

Source File
Press 'n' to go to next uncovered line, 'b' for previous

25.62
/internal/ui/commit_view.go


Source Not Available

STATUS · Troubleshooting · Open an Issue · Sales · Support · CAREERS · ENTERPRISE · START FREE · SCHEDULE DEMO
ANNOUNCEMENTS · TWITTER · TOS & SLA · Supported CI Services · What's a CI service? · Automated Testing

© 2026 Coveralls, Inc