Look at a given position in the editor if there is a brace (according to the setting editor_braces) before or after,
and return the information about the context It always look first at the character after the position.

Params:
pos - the cursor position in the editor [defaults to cursor position) : int
Return:
undef if no brace, otherwise [brace, actual_pos, is_after, is_opening]
where:
brace - the brace char at actual_pos
actual_pos - the actual position where the brace has been found
is_after - true iff the brace is after the cursor : boolean
is_opening - true iff only the brace is an opening one
Examples:
|{} => should find the { : [0,{,1,1]
{|} => should find the } : [1,},1,0]
{| } => should find the { : [0,{,0,1]

The position method is used to clean parameters that are supposed to refer to a position within the editor. It takes what should be an numeric document position, constrains the value to the actual position range of the document, and removes any fractional characters.

This method should generally be used when doing something to a document somewhere in it preferable aborting that functionality completely.

Returns an integer character position guaranteed to exist in the document.

The line method is used to clean parameters that are supposed to refer to a line within the editor. It takes what should be an numeric document line, constrains the value to the actual line range of the document, and removes any fractional characters.

This method should generally be used when doing something to a document somewhere in it preferable aborting that functionality completely.