Drop own foldcode.js lib and load 3 x addon files from CodeMirror
instead
Set new CSS classes to override those in addon lib files
Set default gutter name, and a min fold size of 1
Remove calls to own code folding function
If we have multiple selections, deselect to the primary selection only.
If we only have a single selection, then we comment/uncomment.
(Avoids having multiple selections, pressing Esc to clear to a single
and also unwantedly commenting/uncommenting).
Green class has black text to make more visible
Grey class has darker background
New lighter grey class added for non changed portions of text on diff
line
This initialisation should be false to start with as we set PHP mode as
a basis and have no linter for that
We set the mode in processes/on-editor-load.php and then lint: true if
it's a JS mode.
Tab lines now 0.15 opacity as a tweak
diff pane set to 50% width and add, remove and change diff classes added
cMOptions established as object to pass through when initialising editor
instances
Code related to initialising and adding actions to editor instance now
moved to main JS file and we are just about doubling everything up for
the diff pane
New events added for focus and blur also, with functions in main JS file
Active lines also created for diff pane
onKeyEvent is no longer a param function, now something set in an 'on'
event function
setLine now replaceRange
doFold is the new fold function, "brace" or "xml" string passed to it,
not an object now
codeFoldTag and codeFoldBrace vars no longer needed now
Left column of info display now 300px wide and also contains your device
info
Also removed some line breaks, result of this is a smaller screen area
needed, less likely to get double scrollbars using ICEcoder on smaller
screens
No need to call redoChangedContent anymore, removed that function
No need to set changedContent array. It's now savedPoints array, only
updated on save not changes
onKeyEvent actually happens on multiple events (keypress and keyup at
least)
Wrapped in an if statement now so we only trigger half the time, meaning
half the work, meaning improved usage
Clear any existing timeouts and set a new Timeout to trigger the
findReplace action in 0.5s
This means as you type it's continually clearing & setting timeouts
When you pause typing for more then 0.5s, then it'll trigger the
findReplace
The result is no lag whilst typing and giving find results within
inactivity time only
beforeSelectChange stores the previous line number
On cursor activity now it works out if the line we were on would be
empty if we removed white space and if so, clear the line
XML hint needs to be included to have HTML hinting
margin-left added to offset border-left
CoffeeScript hinting added also
Extra function added to handle autocomplete on keypress with a debounce
timeout on 200ms