April White: > However, recently I added a call to 'CenterCursor' after the cursor has > been position by the OnOpen hook. This is not working. This error is > reported: > > ...\SciTEExtension.lua:510: bad argument #1 to > `VisibleFromDocLine' (number expected, got string) > > The function is: > function CenterCursor() > local line = props.SelectionStartLine;
SelectionStartLine is set by SelectionIntoProperties which is called before running tool commands (not event handlers) and setting the status bar. At other times it is ''. You could either test for '' or work out the line of the start of the selection with editor:LineFromPosition(editor.SelectionStart). Neil _______________________________________________ Scite-interest mailing list [email protected] http://mailman.lyra.org/mailman/listinfo/scite-interest
