Files
oak-gpui/crates
Joseph T. Lyons 3cf7164a54 Fix text transformation commands for multiple line, single selection cases (#3060)
If you highlight the following block of text (with a single selection):

```
The quick brown
fox jumps over
the lazy dog
```

and run `editor: convert to upper camel case`, you'll get:

```
TheQuickBrown
foxJumpsOver
theLazyDog
```

instead of:

```
TheQuickBrown
FoxJumpsOver
TheLazyDog
```

The same thing happens for `editor: convert to title case`. This happens
because [`to_case` crate](https://crates.io/crates/convert_case) doesn't
allow the user to define '\n' as a boundary. I wanted to fix this at the
lib level, so I filled [an
issue](https://github.com/rutrum/convert-case/issues/16) but I never
heard back. What's strange is VS Code and Sublime I think both exhibit
the same output as we do currently, but I don't personally think this
feels right (happy to hear opposing opinions). I'm just doing the naive
thing to hack around this limitation of the `to_case` crate.

I did some testing and it seems I only need to adjust `editor: convert
to title case` and `editor: convert to upper camel case`. The way the
other transformations are implemented in `to_case` don't seem to have
this issue.

Release Notes:

- Fixed a bug where running certain text transfomration commands on a
single selection covering multiple lines would not transform all
selected lines as expected.
2023-09-28 14:04:17 -04:00
..
2023-09-22 09:33:59 -04:00
2023-09-26 14:18:32 -04:00
2023-09-20 16:40:29 -07:00
2023-09-15 15:25:35 -04:00
2023-09-20 17:39:21 -07:00
2023-09-26 14:18:32 -04:00
2023-09-20 21:29:45 -06:00
2023-08-15 03:06:43 -07:00
2023-09-20 20:44:41 -06:00
2023-09-11 09:00:59 -06:00
2023-09-09 14:01:53 -07:00
WIP
2023-08-10 10:26:48 -06:00
2023-09-07 22:24:02 -06:00
2023-09-20 21:29:45 -06:00
2023-09-15 15:25:35 -04:00
2023-08-25 10:11:32 -07:00
2023-09-27 16:07:35 -06:00
WIP
2023-08-10 10:26:48 -06:00
2023-09-27 17:02:47 -06:00
2023-09-27 12:26:48 -04:00