diff options
author | Gergo Mocsi <gmocsi91@gmail.com> | 2013-07-26 13:57:29 +0200 |
---|---|---|
committer | Gergo Mocsi <gmocsi91@gmail.com> | 2013-09-02 18:16:50 +0200 |
commit | 412e91d33dfc392f15858614369f956e531785b9 (patch) | |
tree | 29e016ad704aa6e3288963f4a6792dde137859aa /basic | |
parent | GSOC work, fix runtime crash (diff) | |
download | core-412e91d33dfc392f15858614369f956e531785b9.tar.gz core-412e91d33dfc392f15858614369f956e531785b9.zip |
GSOC work, implement "Autoclose parenthesis" function
Autoclosing parenthesis function is working. Implementation is similar to autoclosing double quotes, except that this one does not need the HighlighPortion struct to use.
Renamed the checkbox title to "Autoclose parenthesis".
Change-Id: I4311cd8020f0dc0b62a2d8707e0eccbf57e0d2c2
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 3e327c65ff7c..728dcb4a1d81 100644 --- a/basic/source/classes/codecompletecache.cxx +++ b/basic/source/classes/codecompletecache.cxx @@ -29,7 +29,8 @@ namespace CodeCompleteOptions::CodeCompleteOptions() : bIsCodeCompleteOn( false ), bIsProcedureAutoCompleteOn( false ), -bIsAutoCloseQuotesOn( false ) +bIsAutoCloseQuotesOn( false ), +bIsAutoCloseParenthesisOn( false ) { } @@ -68,6 +69,16 @@ void CodeCompleteOptions::SetAutoCloseQuotesOn( const bool& b ) theCodeCompleteOptions::get().bIsAutoCloseQuotesOn = b; } +bool CodeCompleteOptions::IsAutoCloseParenthesisOn() +{ + return theCodeCompleteOptions::get().aMiscOptions.IsExperimentalMode() && theCodeCompleteOptions::get().bIsAutoCloseParenthesisOn; +} + +void CodeCompleteOptions::SetAutoCloseParenthesisOn( const bool& b ) +{ + theCodeCompleteOptions::get().bIsAutoCloseParenthesisOn = b; +} + std::ostream& operator<< (std::ostream& aStream, const CodeCompleteDataCache& aCache) { aStream << "Global variables" << std::endl; |