add wrap behavior for [
This commit is contained in:
parent
16ca8e1b02
commit
ba7142a3d4
1 changed files with 6 additions and 1 deletions
|
|
@ -151,7 +151,12 @@ var CstyleBehaviour = function () {
|
|||
if (text == '[') {
|
||||
var selection = editor.getSelectionRange();
|
||||
var selected = session.doc.getTextRange(selection);
|
||||
if (selected === "") {
|
||||
if (selected !== "") {
|
||||
return {
|
||||
text: '[' + selected + ']',
|
||||
selection: false
|
||||
};
|
||||
} else {
|
||||
return {
|
||||
text: '[]',
|
||||
selection: [1, 1]
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue