New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
fixed autocapitalize cursor issue #174
Conversation
src/crate/crash/repl.py
Outdated
if self.last_changed and self.is_prefix(current_line.lower(), self.last_changed.lower()): | ||
diff = len(self.last_changed) - len(current_line) | ||
current_line = self.last_changed + current_line[diff:] | ||
|
||
new_line = re.sub(self.KEYWORD_RE, self.keyword_replacer, current_line) | ||
new_line = re.sub(self.KEYWORD_RE, self.keyword_replacer, \ |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
\
not required when having function arguments separated by newlines
same below
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
also, I think all arguments would fit into a single line
CHANGES.txt
Outdated
@@ -5,6 +5,9 @@ Changes for crash | |||
Unreleased | |||
========== | |||
|
|||
- Fixed issue that caused the autocapitalization to move the cursor |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
we must not forget to remove that line when doing a release
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
should I remove it from the changelog ?
5 similar comments
543cd94
to
7b3e2f6
Compare
5 similar comments
Codecov Report
@@ Coverage Diff @@
## master #174 +/- ##
=======================================
Coverage 81.11% 81.11%
=======================================
Files 16 16
Lines 1859 1859
=======================================
Hits 1508 1508
Misses 351 351
Continue to review full report at Codecov.
|
9e3ae95
to
451b1fd
Compare
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
lgtm
@m-kharbat please wait for green CI |
f14c266
to
980778c
Compare
select * from foo
then move the cursor back to*
and adddate_trunc
it will capitalize DATE but not lowercase it again when typing further. http://g.recordit.co/hTB7BCuB0C.gif