1. if there is some selection - in the code window - put it into the search box straight away
2. tweak for Chrome - somewhy it had problem with using Ctrl-F more then once
newFile now just calls newTab but with 'alsoSave' param, which is picked
up and runs saveFile, giving more power to the API
When opening a file, if it's a new tab, call createNewTab with a 'new'
param, which is picked up and if set, we don't call setPreviousFiles. We
don't want to set them on adding a new tab anyway, plus it creates an
extra process, which means the server queue gets jammed and new tabs
don't get a save action processed.
Remote menu option is now Source
Don't hard code or pass through the adjustCursor value
shiftSim param added so we can simulate a shift key just as we do with
ctrlSim
boxSelect function added so we can draw a box on drag in the file
manager and select files. Math.abs used to always return a positive
number
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).
First step towards replacing the old HTTP & form posting looparound
method, with a much more efficient XHR and JSON response system. For
now, only save uses this, load, delete, perms etc use old system until
save is stablised and fully tested.
Starts XHR call and when we have a response, if there's an error, show
that, otherwise, do the items listed in the doNext value.
The 777 perm is now shown with a red background (and white text) so it
stands out as a bad practise. May look to add a setting to turn this
on/off in future.
Piped paths converted to slashes on chmod server message display
On up/down/left/right/Enter, if we have no file selected, select root as
a start point
On init, select root dir
fmAction added to allow movement around file manager with
up,down,left,right and enter
load param in openCloseDir is now always the opposite of what it was
before. Function also removes node if it was UL, so we don't have hidden
elems still there
Refactored tag wrapper section
Added conditions to move between file and content areas
(CTRL+Alt+left/right)
Space is no longer the key to refocuson content area
Up/down = traverse up/down in current dir
Left = back up to parent dir
Right = open dir/select 1st item in dir/open file
Enter = expand/refresh dir or open file
cursorHeight is a number from 0 to 1, based on % of line height. As we
set line heights in diff mode and the default cursorHeight is 1, it
fills 100% of the height. this tweak ensures the cursor height is the
same as the text height.
renderLineStyle is now an array of style arrays
cMonScroll function added to move scroll position of other pane to match
The on('renderLine') event now covers all lines, a change since earlier
versions of CodeMirror
This means a reworking of code was needed here to firstly identify a
matching pane and then if we have a match, add the style. Done in a for
loop and considers array items in renderLineStyle
Reworked much of the updateDiffs functin to reset array & value to begin
with and push to renderLineStyle array now. Also only doing this if we
have a height higher than normal to set, for perf reasons
No need to set renderLineStyle to false anymore
Finally, sorted the order things happen into 2 logical sections - main
pane changes first then diff pane changes after
ctrlSim param available to simiulate a CTRL key
In githubDiff mode, show the number of selected files and update button
and text colours
gitHubAction function added to call the github.php file with that action
in the URL in the centre of screen
Function also added to show/hide GitHub nav
Removed old alert message as we're much closer to being finished now