jskinner / DefaultPackages

Old bug tracker for Sublime Text's "Default Packages", e.g. bad syntax highlighting
http://web.archive.org/web/20150524043750/https://www.sublimetext.com/forum/viewtopic.php?f=2&t=12095
26 stars 2 forks source link

"title_case" command leaves some words unchanged #87

Closed titoBouzout closed 8 years ago

titoBouzout commented 9 years ago

From @canoeberry on December 21, 2014 14:3

If I highlight the following code:

cursor = function(regions[i], *args, **kwargs)

and execute the title_case command, I get this:

Cursor = Function(regions[i], *args, **kwargs)

As you can see, "regions", "i", "args" and "kwargs" were not touched, because the characters in front were ... punctuation or something? Not sure, but it is wrong in my opinion.

If I run the upper_case command instead, I get this:

CURSOR = FUNCTION(REGIONS[I], *ARGS, **KWARGS)

as expected.

Copied from original issue: SublimeTextIssues/Core#613

canoeberry commented 9 years ago

I implemented a work-around by copying the text out of the buffer with view.substr(...) and then calling text.title() on the result and splicing it back in. It's not too bad.

FichteFoll commented 8 years ago

This issue was moved back to the other repo.