Don't insert quotes before text or around other quotes
This commit is contained in:
parent
4348a9dd23
commit
6953b175a1
1 changed files with 2 additions and 2 deletions
|
|
@ -243,12 +243,12 @@ var CstyleBehaviour = function () {
|
|||
var quote = text;
|
||||
var selection = editor.getSelectionRange();
|
||||
var selected = session.doc.getTextRange(selection);
|
||||
if (selected !== "") {
|
||||
if (selected !== "" && selected !== "'" && selected != '"') {
|
||||
return {
|
||||
text: quote + selected + quote,
|
||||
selection: false
|
||||
};
|
||||
} else {
|
||||
} else if (CstyleBehaviour.isSaneInsertion(editor, session)) {
|
||||
var cursor = editor.getCursorPosition();
|
||||
var line = session.doc.getLine(cursor.row);
|
||||
var leftChar = line.substring(cursor.column-1, cursor.column);
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue