CoreFiles by mySites.guru
jump-to-line.min.js1 lines, 1,159 bytes, from Joomla_4.0.0-beta1-Beta-Full_Package.zip
Raw History Compare with 3.9.0-beta4
md5
fcbeb84d1bf08f9d90eeae3b6dd729ef
sha1
6026517662d2c4b1a681569efad9c4f185cb74cc
sha256
754cffd533a873c8f26e1519b865a9527f56b6d1c85d6d516f8dbbc8f21cc683
!function(e){"object"==typeof exports&&"object"==typeof module?e(require("../../lib/codemirror"),require("../dialog/dialog")):"function"==typeof define&&define.amd?define(["../../lib/codemirror","../dialog/dialog"],e):e(CodeMirror)}(function(e){"use strict";function r(e,r){var o=Number(r);return/^[-+]/.test(r)?e.getCursor().line+o:o-1}e.commands.jumpToLine=function(e){var o=e.getCursor();!function(e,r,o,t,i){e.openDialog?e.openDialog(r,i,{value:t,selectValueOnOpen:!0}):i(prompt(o,t))}(e,function(e){return e.phrase("Jump to line:")+' <input type="text" style="width: 10em" class="CodeMirror-search-field"/> <span style="color: #888" class="CodeMirror-search-hint">'+e.phrase("(Use line:column or scroll% syntax)")+"</span>"}(e),e.phrase("Jump to line:"),o.line+1+":"+o.ch,function(t){var i;if(t)if(i=/^\s*([\+\-]?\d+)\s*\:\s*(\d+)\s*$/.exec(t))e.setCursor(r(e,i[1]),Number(i[2]));else if(i=/^\s*([\+\-]?\d+(\.\d+)?)\%\s*/.exec(t)){var n=Math.round(e.lineCount()*Number(i[1])/100);/^[-+]/.test(i[1])&&(n=o.line+n+1),e.setCursor(n-1,o.ch)}else(i=/^\s*\:?\s*([\+\-]?\d+)\s*/.exec(t))&&e.setCursor(r(e,i[1]),o.ch)})},e.keyMap.default["Alt-G"]="jumpToLine"});

The same content is in 10 releases, Joomla 4.0.0-alpha8 to 4.0.0-beta6. See them all, or every version of this file.