AutoCorrect - Adds first selection when pressing...

Topics: User Forum
Mar 18, 2012 at 8:30 AM

Hi agian!

Another issue I am facing with ScintellaNET, is that when you type a peroid, or a bracket:

.

(

It takes the first drop down selection in AutoComplete, and pastes it. (as if you had pressed enter)

 

here is my config.xml:


<Language Name="batch">
		<AutoComplete FillUpCharacters=".([" SingleLineAccept="True" IsCaseSensitive="False">
			<List>
				@echo call cd cls echo for goto if null OFF ON path pause prompt rem set shift user
			</List>
		</AutoComplete>

		<Indentation TabWidth="4" SmartIndentType="cpp" />
			
		
		<Lexer>	
			<Keywords List="0" Inherit="False">
				@echo call cd cls echo for goto if null OFF ON path pause prompt rem set shift user
			</Keywords>
		</Lexer>
	</Language>

Help please? Thank you. (:

Coordinator
Mar 19, 2012 at 12:39 AM

Per the doc comments on the AutoComplete.FillUpCharacters property:

List of characters (no separated) that causes the AutoComplete window to accept the current selection.

As you have it configured, pressing '.' or '(' will accept the current selection.


Jacob

Mar 20, 2012 at 4:30 AM

But there is no Characters entered in the AutoComplete.FillUpCharacters property, nor has it been defined in code.

Coordinator
Mar 20, 2012 at 5:12 AM

It's specified in the config file

 

<AutoComplete FillUpCharacters=".([" SingleLineAccept="True" IsCaseSensitive="False">

 

For the most part the config file is a mirror of the object model. So having this line in your config is basically doing this in code

 

scintillaControl.AutoComplete.FillUpCharacters = ".([";
scintillaControl.AutoComplete.SingleLineAccept = true;
scintillaControl.AutoComplete.IsCaseSensitive = false;

I'm not partial to the name "FillUpCharacters" for this property. I think "AcceptCharacters" is more intuitive. FillUpCharacters comes from the Scintilla API.