Commit Graph
373 Commits
Author SHA1 Message Date
Maas Lalani 5db9f39f56 fix: set model max view to height initially 2023-03-09 14:20:08 -05:00
Maas Lalani 1ca90b3c94 feat(filepicker): allow setting current directory 2023-03-08 17:00:21 -05:00
Glenn GondaandMaas Lalani 78a82d1616 fix(textinput): KeyMap typo 2023-03-07 22:01:46 -05:00
Maas LalaniandGitHub 3372cf1aea Filepicker Bubble (#343)
* feat: filepicker bubble

* fix: bump bubbles to 1.16

* fix: allow customization of empty state

* fix: change `Enter` to `Open`

* fix: lint gomnd

* fix: don't send msg, instead check if this update caused a selection
2023-03-06 10:59:59 -05:00
Savannah OstrowskiandChristian Rocha e4e3137a64 Remove unused BackgroundStyle in text input 2023-03-01 19:52:54 -05:00
Glenn GondaandChristian Rocha 3d3ed883d3 docs: fix typos and improve comment clarity 2023-02-16 17:49:32 -05:00
Raphael 'kena' PossandMaas Lalani ee382285e7 fix(textarea): fix data corruption after multi-line input
Previously, when inserting multiple lines of input at once, the underlying
Go data array was incorrectly shared in memory across multiple rows
of the textarea. This was causing input corruption, where a user trying
to modify one line would see their text added on the next line as well.

This patch fixes it.
2023-02-05 10:19:05 -08:00
Raphael 'kena' PossandMaas Lalani db06ae17d3 fix(textarea): support pastes that end with a newline character
My previous fix did not properly handle a multi-rune input that *ends*
with a newline character. In that case, the final newline was removed.

I found this using the test suite I built for textarea in bubbline at
https://github.com/knz/bubbline/tree/main/editline/internal/textarea/testdata.
2023-01-24 14:19:14 -05:00
a6a12c4a31 fix(textarea): app would crash if deleteWordRight was called at the end of line (#313)
* fix(textarea): app would crash if deleteWordRight was called at the end
of line

* fix(textarea): deleteWordRight would work incorrectly

Co-authored-by: infastin <thecookied123@gmail.com>
2023-01-23 13:10:21 -05:00
Christian RochaandGitHub 4a71cee5a1 fix(viewport): performance scrolling (#312)
* fix(viewport): performance scroll behavior for line up/down

* fix(viewport): performance scrolling in multi-line operations
v0.15.0
2023-01-20 10:51:00 -05:00
Yusuf Malikul MulkiandGitHub 30998513ba ypo (#300) 2023-01-19 00:20:02 -05:00
Raphael 'kena' PossandMaas Lalani 53724e6a72 feat: bracketed paste in textarea + textinput
This also fixes a longstanding bug where newlines, tabs
or other control characters in the clipboard would cause
the input to be corrupted on paste.
2023-01-09 16:30:24 -05:00
Maas Lalani e78f923af6 feat(table): add SetColumns method to set columns 2022-12-01 09:41:08 -05:00
Marc-Antoine GiguèreandMaas Lalani 9bcda81051 revert module name 2022-12-01 09:30:35 -05:00
Marc-Antoine GiguèreandMaas Lalani 9e69e31e23 update module declaration 2022-12-01 09:30:35 -05:00
Marc-AntoineandMaas Lalani b528165592 expose table's rows 2022-12-01 09:30:35 -05:00
dependabot[bot]andMaas Lalani 6555e5111e feat(deps): bump github.com/charmbracelet/bubbletea
Bumps [github.com/charmbracelet/bubbletea](https://github.com/charmbracelet/bubbletea) from 0.23.0 to 0.23.1.
- [Release notes](https://github.com/charmbracelet/bubbletea/releases)
- [Commits](https://github.com/charmbracelet/bubbletea/compare/v0.23.0...v0.23.1)

---
updated-dependencies:
- dependency-name: github.com/charmbracelet/bubbletea
  dependency-type: direct:production
  update-type: version-update:semver-patch
...

Signed-off-by: dependabot[bot] <support@github.com>
2022-12-01 09:27:56 -05:00
Jager,PetarandMaas Lalani 94252ef3b9 remove renderedlines from table struct 2022-12-01 09:24:30 -05:00
Jager,PetarandMaas Lalani 7392b363bd fix: corner cases, YOffset manipulation for orig. scrolling 2022-12-01 09:24:30 -05:00
Jager,PetarandMaas Lalani 41478c3031 Table: Make UpdateViewport() have constant runtime, not depending on number of rows in a table 2022-12-01 09:24:30 -05:00
Christian Muehlhaeuser 925e5bd8ea chore: disable dependabot timer 2022-11-18 02:11:00 +01:00
Christian Rocha 2b5b8624d6 fix: use non-deprecated spinner tick command in list 2022-11-17 10:41:13 -05:00
Christian Rocha 30c01cabdc chore: apply appropriate GoDoc syntax to deprecated items 2022-11-17 10:41:13 -05:00
dependabot[bot]andChristian Muehlhaeuser eb09d7539c feat(deps): bump github.com/charmbracelet/bubbletea
Bumps [github.com/charmbracelet/bubbletea](https://github.com/charmbracelet/bubbletea) from 0.22.1 to 0.23.0.
- [Release notes](https://github.com/charmbracelet/bubbletea/releases)
- [Commits](https://github.com/charmbracelet/bubbletea/compare/v0.22.1...v0.23.0)

---
updated-dependencies:
- dependency-name: github.com/charmbracelet/bubbletea
  dependency-type: direct:production
  update-type: version-update:semver-minor
...

Signed-off-by: dependabot[bot] <support@github.com>
2022-11-15 12:31:37 +01:00
Adam BullandGitHub fac7a01329 feat(viewport): line count getters (#283) 2022-11-07 10:05:03 -05:00
Christian Muehlhaeuser 0474e129b8 docs: picture tag is causing display issues 2022-10-25 03:23:29 +02:00
Christian Muehlhaeuser 405c3adc42 docs: new readme footer 2022-10-24 10:23:47 +02:00
Raphael 'kena' PossandMaas Lalani 85da9addba feat: make the paginator key bindings customizable 2022-10-07 12:49:15 -04:00
Craig WilsonandMaas Lalani aea42690e7 fix(help): full help renders fully when width is unset. 2022-10-07 12:36:11 -04:00
Raphael 'kena' PossandMaas Lalani 9a48dca003 feat: support key bindings in textinput like textarea 2022-10-07 11:27:19 -04:00
hhe07andGitHub b2b7040ccf fix(textarea): paste (#250) 2022-10-06 15:54:43 -04:00
Maas Lalani d3aed22a41 Revert "chore: move cursor bubble to internal"
This reverts commit a4ed54327f.
2022-10-06 15:33:16 -04:00
Maas Lalani d177512114 fix: set value moves cursor only when empty and at starting position 2022-10-06 11:42:29 -04:00
dependabot[bot]andChristian Muehlhaeuser e857875f2a feat(deps): bump github.com/charmbracelet/bubbletea
Bumps [github.com/charmbracelet/bubbletea](https://github.com/charmbracelet/bubbletea) from 0.21.0 to 0.22.1.
- [Release notes](https://github.com/charmbracelet/bubbletea/releases)
- [Commits](https://github.com/charmbracelet/bubbletea/compare/v0.21.0...v0.22.1)

---
updated-dependencies:
- dependency-name: github.com/charmbracelet/bubbletea
  dependency-type: direct:production
  update-type: version-update:semver-minor
...

Signed-off-by: dependabot[bot] <support@github.com>
2022-09-26 08:26:06 +02:00
dependabot[bot]andChristian Muehlhaeuser f531ca3055 feat(deps): bump github.com/charmbracelet/lipgloss from 0.5.0 to 0.6.0
Bumps [github.com/charmbracelet/lipgloss](https://github.com/charmbracelet/lipgloss) from 0.5.0 to 0.6.0.
- [Release notes](https://github.com/charmbracelet/lipgloss/releases)
- [Commits](https://github.com/charmbracelet/lipgloss/compare/v0.5.0...v0.6.0)

---
updated-dependencies:
- dependency-name: github.com/charmbracelet/lipgloss
  dependency-type: direct:production
  update-type: version-update:semver-minor
...

Signed-off-by: dependabot[bot] <support@github.com>
2022-09-26 08:22:33 +02:00
dependabot[bot]andChristian Muehlhaeuser ea21e3b359 feat(deps): bump github.com/mattn/go-runewidth from 0.0.13 to 0.0.14
Bumps [github.com/mattn/go-runewidth](https://github.com/mattn/go-runewidth) from 0.0.13 to 0.0.14.
- [Release notes](https://github.com/mattn/go-runewidth/releases)
- [Commits](https://github.com/mattn/go-runewidth/compare/v0.0.13...v0.0.14)

---
updated-dependencies:
- dependency-name: github.com/mattn/go-runewidth
  dependency-type: direct:production
  update-type: version-update:semver-patch
...

Signed-off-by: dependabot[bot] <support@github.com>
2022-09-26 08:19:30 +02:00
dependabot[bot]andChristian Muehlhaeuser f67537dca5 chore(deps): bump actions/checkout from 2 to 3
Bumps [actions/checkout](https://github.com/actions/checkout) from 2 to 3.
- [Release notes](https://github.com/actions/checkout/releases)
- [Changelog](https://github.com/actions/checkout/blob/main/CHANGELOG.md)
- [Commits](https://github.com/actions/checkout/compare/v2...v3)

---
updated-dependencies:
- dependency-name: actions/checkout
  dependency-type: direct:production
  update-type: version-update:semver-major
...

Signed-off-by: dependabot[bot] <support@github.com>
2022-09-26 08:16:51 +02:00
dependabot[bot]andChristian Muehlhaeuser b7a4a1cd93 chore(deps): bump actions/setup-go from 2 to 3
Bumps [actions/setup-go](https://github.com/actions/setup-go) from 2 to 3.
- [Release notes](https://github.com/actions/setup-go/releases)
- [Commits](https://github.com/actions/setup-go/compare/v2...v3)

---
updated-dependencies:
- dependency-name: actions/setup-go
  dependency-type: direct:production
  update-type: version-update:semver-major
...

Signed-off-by: dependabot[bot] <support@github.com>
2022-09-26 08:16:35 +02:00
Christian Muehlhaeuser 4ae575a4c5 chore: use latest gofmt 2022-09-26 08:13:03 +02:00
Christian Muehlhaeuser bd074d2dbc ci: add separate sets of hard- and soft-enforced linters 2022-09-26 08:13:03 +02:00
Christian Muehlhaeuser 18909edafc chore: add dependabot config 2022-09-26 08:02:50 +02:00
Tom PayneandGitHub 72d87e4513 chore: Miscellaneous minor fixes (#243)
* chore: remove internal use of deprecated NewModel

* chore: miscellaneous comment fixes
2022-09-15 10:51:42 -04:00
Maas Lalani a4ed54327f chore: move cursor bubble to internal 2022-09-14 15:45:51 -04:00
Maas LalaniandGitHub a99b55cda1 Delegate Cursor Logic to cursor bubble (#181)
* refactor: remove cursor logic from textinput
* chore: Add Deprecated Fields to avoid breaking changes
* fix: Ctrl+A and typing moves to end bug
2022-09-14 10:44:10 -04:00
062b257e8c fix(cursor): apply TextStyle inline (#230)
Co-authored-by: Maas Lalani <maas@lalani.dev>
2022-09-07 16:05:25 -04:00
Maas Lalani 8b3bfee06d docs: add table bubble to README 2022-09-06 13:28:31 -04:00
Maas Lalani ff77858511 docs: change tea{,party} to bubbletea 2022-09-06 13:28:31 -04:00
Bastian WinklerandMaas Lalani 13f52d678d fix(table): append headers/columns to zero sized string slice v0.14.0 2022-09-02 16:30:15 -04:00
Raphael 'kena' PossandGitHub 278edd1c2b fix(viewport): properly truncate to size (#228)
There are many "interesting" cases:

- logical content is wider than display width (long lines).
  In this case, we truncate.
- logical content is smaller than display height (fewer lines
  than visible).
  In this case, we pad with empty lines up to the specified height.
- logical content is higher than display height (more lines than
  visible).
  In this case, we truncate.

- style specifies a width wider than the display width.
  In this case, we ignore the style width and
  fit in the display width.
- style specifies a height higher than the display height.
  Same as width, we ignore the style and fit in the display height.
- style specifies a narrower width or smaller height than the display.
  In this case we obey the style.
2022-09-02 12:50:33 -07:00
Raphael 'kena' PossandMaas Lalani 09e1f00349 textarea: support dynamic prompts
The dynamic prompt can be different on every line.
See for example:
[![asciicast](https://asciinema.org/a/iFBPBwoDZOzcoRJOgfmPk8ObH.svg)](https://asciinema.org/a/iFBPBwoDZOzcoRJOgfmPk8ObH)
2022-09-02 14:31:26 -04:00