Commit Graph
330 Commits
Author SHA1 Message Date
Maas Lalani 9eea57c1e8 feat: insert new lines with o/O 2022-08-15 10:38:16 -04:00
Maas Lalani e691e35a6d fix(textarea): reset lastCharOffset if not moving vertically 2022-08-15 10:38:15 -04:00
Maas Lalani 0f1a912f12 fix: edge cases with {d,c}iw and {d,c}aw 2022-08-15 10:38:15 -04:00
Maas Lalani 715108b08b fix(textarea): better SeekInner and SeekAround 2022-08-15 10:38:15 -04:00
Maas Lalani 3e1a14200c fix(textarea): ActionChange + e should also delete end of word 2022-08-15 10:38:15 -04:00
Maas Lalani 907f5e659d feat(textarea): motions for seeking to characters (f/t/T/F/a/i) 2022-08-15 10:38:15 -04:00
Maas Lalani 2cffee5f40 fix(textarea): deleteRange multiple lines 2022-08-15 10:38:15 -04:00
Maas Lalani 8c9798c7f6 feat(textarea): findWordRight / findWordLeft 2022-08-15 10:38:15 -04:00
Maas Lalani fdfe776a07 feat: delete/change ranges 2022-08-15 10:38:14 -04:00
Maas Lalani fb44abddf8 refactor: split files into {modal,normal,insert}.go 2022-08-15 10:38:14 -04:00
Maas Lalani 447ff2da6a feat: ranges and motions 2022-08-15 10:38:14 -04:00
Maas Lalani 57a01e62e3 fix: cursor updating
cursor remains static in Normal mode and blinks in insert mode.
2022-08-15 10:38:14 -04:00
Maas Lalani f5b74d002c feat(textarea): basic vim emulation
Normal & Insert Mode
Normal Mode:
* i/I/a/A insert at cursor, after cursor, start, end
* e/E/w/W word forward
* b/B word backward
* h/j/k/l cursor left/down/up/right
* p to paste
2022-08-15 10:38:06 -04:00
kena 649f78e1fd fix(textarea): pre-allocation of value (#213)
The maximum slice size of m.value is the max number of rows,
which is the max height.
2022-08-15 10:25:20 -04:00
kena e72e4a190b perf(textarea): amortize heap allocs in Value (#212) 2022-08-15 10:24:54 -04:00
kena 9b67fb8724 perf: avoid recomputing the key representation in key.Matches 2022-08-12 16:07:31 -04:00
Maas Lalani 93e3c756c4 docs: responsive images for mobile 2022-08-08 17:35:57 -04:00
Maas Lalani e200bf8c81 feat: LineCount method for counting number of lines in textarea 2022-08-05 16:37:05 -04:00
Maas Lalani 47eee84147 fix: include new line characters for Length() 2022-08-05 16:37:05 -04:00
Maas Lalani 84eacf535a fix: CharLimit <= 0 should be ignored 2022-08-04 14:52:50 -04:00
Maas Lalani 8f65160828 fix: add ctrl+h to backspace text 2022-07-31 13:20:02 -04:00
58a9d4c7ec feat: table bubble (#173)
Add table Bubble for displaying tabular data

Co-authored-by: Maas Lalani <maas@lalani.dev>
Co-authored-by: Christian Rocha <christian@rocha.is>
2022-07-21 15:06:38 -04:00
Maas Lalani e32dcde62a fix(viewport): Guard against negative string repetitions (#196) 2022-07-21 14:39:17 -04:00
Hironao OTSUBO e49b5573bc fix(key): Unbound keys should be disabled
* fix condition for #188
This is a fix of https://github.com/charmbracelet/bubbles/pull/188
Unbound keys has nil keys and they are not Enabled
2022-07-11 10:45:18 -04:00
Maas Lalani 746ec595c3 fix(textarea): change placeholder color to match textinput (#192) 2022-07-07 22:34:48 -04:00
Hironao OTSUBO d4eeb4f5be fix(key): unbound keys are not enabled 2022-07-06 17:01:28 -07:00
Jonah b74f696cc8 feat(list): add IsFiltered method (#98) 2022-07-05 16:38:10 -04:00
Maas Lalani 3a34fc4ff8 fix(textarea): Add deleteWordRight v0.13.0 2022-07-05 14:26:22 -04:00
Maas Lalani 2a2fb10f5f fix(textarea): account for base styling frame when calculating width 2022-07-05 14:26:22 -04:00
Gabriel Nagy 588393fbf8 fix(textinput): set cursor on initial value
This reverts the code back to the logic from 4ce16e8 which fixed the
issue of the cursor not being moved when an initial value was set with
SetValue.

The fix regressed in 16053f4.
2022-07-05 09:16:19 -04:00
Leandro LópezandMaas Lalani 7cc5786984 feat(spinners): Construct new spinners with WithSpinner + WithStyle options (#148)
* Add spinner.New test

Signed-off-by: Leandro López (inkel) <inkel.ar@gmail.com>

* Add spinner.Option type and spinner.WithSpinner option

Signed-off-by: Leandro López (inkel) <inkel.ar@gmail.com>

* Allow passing options in spinner.New

This doesn't break existing code as it uses variadic arguments, so
any existing code as the following should continue to work:

    s := spinner.New()
    s.spinner = spinner.Dot

This change allows for instead of those two lines, having a call:

   s := spinner.New(spinner.WithSpinner(spinner.Dot))

Signed-off-by: Leandro López (inkel) <inkel.ar@gmail.com>

* Add spinner.WithX option for each spinner.Spinner

Signed-off-by: Leandro López (inkel) <inkel.ar@gmail.com>

* Refactor spinner tests

Signed-off-by: Leandro López (inkel) <inkel.ar@gmail.com>

* Add spinner.WithStyle option function

Signed-off-by: Leandro López (inkel) <inkel.ar@gmail.com>

* refactor: remove With... Spinner aliases

Co-authored-by: Maas Lalani <maas@lalani.dev>
2022-07-01 11:31:26 -04:00
Kyosuke Fujimoto 3899e1b4cd fix(list): Disable Quit Key (#104) 2022-07-01 11:00:34 -04:00
Pablo Díaz-López 4c1762413a fix(timer): stop should return cmd (#138) 2022-07-01 10:36:12 -04:00
Maas Lalani 2fd583c8ef feat(textarea): Add multi-line text input 2022-06-28 12:29:24 -04:00
Charlie Roth 42f85b4a1b docs: fix paginator example link (#177) v0.12.0 2022-06-21 09:23:57 -04:00
vzvu3k6k 4d0a0ea9d8 docs(spinner): correct comment about internal ID (#171) 2022-06-21 09:17:48 -04:00
Weslei Juan Novaes PereiraandMaas Lalani 658a4febc7 feat: new Hamburger + Meter spinners (#172)
Co-authored-by: Maas Lalani <maas@lalani.dev>
2022-06-21 08:59:23 -04:00
Maas Lalani 93e464296e docs(list): fix linting errors 2022-06-16 18:47:55 -04:00
Weslei Juan Novaes Pereira 57d79daf4d feat(list): ability to SetStatusBarItemName (#169) 2022-06-16 18:14:47 -04:00
IllusionMan1212 e57fd292cc feat: added Validate function for textinput 2022-06-10 12:17:24 -04:00
Hironao OTSUBO 54869f7a1d docs(spinner): remove obsolete comment (#168)
The doc for spinner.Model.Update is obsolete as per 35c3cd626d,
which made Update aware of Msg's type.
2022-06-10 10:03:55 -04:00
Ayman Bagabas 7959eb4867 fix(progress): set a custom termenv color profile (#152) v0.11.0 2022-06-01 18:04:33 -07:00
Christian Rocha fd03b6195d chore: bump bubbletea, harmonica, lipgloss and termenv deps 2022-06-01 17:53:14 -07:00
Christian Rocha a1e1b461b6 fix(textinput): support KeySpace in both present and future Bubble Tea versions
Closes #144
2022-05-29 08:25:34 -07:00
Carlos Alexandro Becker cd2593cfb7 feat: allow to set the height of the item (#155)
* feat: allow to set the height of the item

The user might want to show more than 2 lines, and, right now, if they
try to do so, things break.

Signed-off-by: Carlos A Becker <caarlos0@users.noreply.github.com>

* fix: short-circuit if width <= 0

Signed-off-by: Carlos A Becker <caarlos0@users.noreply.github.com>

* fix: height check

Signed-off-by: Carlos A Becker <caarlos0@users.noreply.github.com>
2022-05-24 15:00:35 -03:00
Tim Adler e1871db6d3 fix: padding in titlebar when nothing is displayed (#139)
* Don't render anything, when nothing is shown

* fix linter issue
2022-05-24 09:05:39 -03:00
Christian Rocha 2a8d463bd1 chore: shorten half page up/down help widths 2022-04-29 12:20:18 -04:00
Ayman Bagabas c214837839 fix: add viewport keymap help 2022-04-29 12:20:18 -04:00
Ayman Bagabas f5ac64216b fix: lint warn 2022-04-29 12:20:18 -04:00
Christian Rocha 292a1dd7ba fix(spinner): remove unused member in model 2022-04-12 10:12:14 -04:00