diff options
author | Gergo Mocsi <gmocsi91@gmail.com> | 2013-07-25 20:15:45 +0200 |
---|---|---|
committer | Gergo Mocsi <gmocsi91@gmail.com> | 2013-09-02 18:16:49 +0200 |
commit | 40433e2ca977173ae6909fc5c47601e11ef003e4 (patch) | |
tree | 132896643e277be1d0ba14f8aaa7f7971c293a90 /basic | |
parent | 9a7b942a0a3bb113cf356f2642766f7a9f909bd6 (diff) |
GSOC work, implemented "Autoclose Double Quotes" option
Feature autoclosing double quotes (strings) implemented.
When the user presses the '"' key, it's pair is also being inserted (only when the previous character is also a '"'), and the cursor is being placed inside the two quotes.
Also, if the there was a string (like: "aaa""), the second one is not inserted.
Change-Id: I3e4a5e426d2d4bdbf56899fe3e36359ae161b52a
Diffstat (limited to 'basic')
-rw-r--r-- | basic/source/classes/codecompletecache.cxx | 13 |
1 files changed, 12 insertions, 1 deletions
diff --git a/basic/source/classes/codecompletecache.cxx b/basic/source/classes/codecompletecache.cxx index 51eee1c84c0a..3e327c65ff7c 100644 --- a/basic/source/classes/codecompletecache.cxx +++ b/basic/source/classes/codecompletecache.cxx @@ -28,7 +28,8 @@ namespace CodeCompleteOptions::CodeCompleteOptions() : bIsCodeCompleteOn( false ), -bIsProcedureAutoCompleteOn( true ) +bIsProcedureAutoCompleteOn( false ), +bIsAutoCloseQuotesOn( false ) { } @@ -57,6 +58,16 @@ void CodeCompleteOptions::SetProcedureAutoCompleteOn( const bool& b ) theCodeCompleteOptions::get().bIsProcedureAutoCompleteOn = b; } +bool CodeCompleteOptions::IsAutoCloseQuotesOn() +{ + return theCodeCompleteOptions::get().aMiscOptions.IsExperimentalMode() && theCodeCompleteOptions::get().bIsAutoCloseQuotesOn; +} + +void CodeCompleteOptions::SetAutoCloseQuotesOn( const bool& b ) +{ + theCodeCompleteOptions::get().bIsAutoCloseQuotesOn = b; +} + std::ostream& operator<< (std::ostream& aStream, const CodeCompleteDataCache& aCache) { aStream << "Global variables" << std::endl; |