Create setting to control if a new line will be indented or not

Currently pressing ENTER on a line that ends with ':', '[', '(' or '{'
automaticaly indents the new line with 4 spaces. The variable added by
this commit to settings.json allow an Etherpad instance to not have this
behavior.
This commit is contained in:
Luiza Pagliari 2015-10-13 18:39:23 -03:00
parent 9d29b15def
commit 5deb06d589
5 changed files with 128 additions and 31 deletions

View file

@ -630,8 +630,8 @@ function handleUserChanges(data, cb)
messageLogger.warn("Dropped message, USER_CHANGES Message has no changeset!");
return cb();
}
//TODO: this might happen with other messages too => find one place to copy the session
//and always use the copy. atm a message will be ignored if the session is gone even
//TODO: this might happen with other messages too => find one place to copy the session
//and always use the copy. atm a message will be ignored if the session is gone even
//if the session was valid when the message arrived in the first place
if(!sessioninfos[client.id])
{
@ -960,7 +960,7 @@ function handleSwitchToPad(client, message)
roomClients[i].leave(padId);
}
}
// start up the new pad
createSessionInfo(client, message);
handleClientReady(client, message);
@ -1231,6 +1231,7 @@ function handleClientReady(client, message)
"plugins": plugins.plugins,
"parts": plugins.parts,
},
"indentationOnNewLine": settings.indentationOnNewLine,
"initialChangesets": [] // FIXME: REMOVE THIS SHIT
}