Server IP : 1.179.227.78 / Your IP : 10.104.4.41 Web Server : Apache System : Linux afdc-mdu34 5.4.0-153-generic #170-Ubuntu SMP Fri Jun 16 13:43:31 UTC 2023 x86_64 User : www ( 1001) PHP Version : 7.4.30 Disable Function : passthru,exec,system,putenv,chroot,chgrp,chown,shell_exec,popen,proc_open,pcntl_exec,ini_alter,ini_restore,dl,openlog,syslog,readlink,symlink,popepassthru,pcntl_alarm,pcntl_fork,pcntl_waitpid,pcntl_wait,pcntl_wifexited,pcntl_wifstopped,pcntl_wifsignaled,pcntl_wifcontinued,pcntl_wexitstatus,pcntl_wtermsig,pcntl_wstopsig,pcntl_signal,pcntl_signal_dispatch,pcntl_get_last_error,pcntl_strerror,pcntl_sigprocmask,pcntl_sigwaitinfo,pcntl_sigtimedwait,pcntl_exec,pcntl_getpriority,pcntl_setpriority,imap_open,apache_setenv MySQL : OFF | cURL : ON | WGET : OFF | Perl : OFF | Python : OFF | Sudo : OFF | Pkexec : OFF Directory : /www/wwwroot/afdc-mdu34.rtarf.mi.th/joomla/media/editors/codemirror/addon/search/ |
Upload File : |
// CodeMirror, copyright (c) by Marijn Haverbeke and others // Distributed under an MIT license: https://codemirror.net/LICENSE // Defines jumpToLine command. Uses dialog.js if present. (function(mod) { if (typeof exports == "object" && typeof module == "object") // CommonJS mod(require("../../lib/codemirror"), require("../dialog/dialog")); else if (typeof define == "function" && define.amd) // AMD define(["../../lib/codemirror", "../dialog/dialog"], mod); else // Plain browser env mod(CodeMirror); })(function(CodeMirror) { "use strict"; function dialog(cm, text, shortText, deflt, f) { if (cm.openDialog) cm.openDialog(text, f, {value: deflt, selectValueOnOpen: true}); else f(prompt(shortText, deflt)); } function getJumpDialog(cm) { return cm.phrase("Jump to line:") + ' <input type="text" style="width: 10em" class="CodeMirror-search-field"/> <span style="color: #888" class="CodeMirror-search-hint">' + cm.phrase("(Use line:column or scroll% syntax)") + '</span>'; } function interpretLine(cm, string) { var num = Number(string) if (/^[-+]/.test(string)) return cm.getCursor().line + num else return num - 1 } CodeMirror.commands.jumpToLine = function(cm) { var cur = cm.getCursor(); dialog(cm, getJumpDialog(cm), cm.phrase("Jump to line:"), (cur.line + 1) + ":" + cur.ch, function(posStr) { if (!posStr) return; var match; if (match = /^\s*([\+\-]?\d+)\s*\:\s*(\d+)\s*$/.exec(posStr)) { cm.setCursor(interpretLine(cm, match[1]), Number(match[2])) } else if (match = /^\s*([\+\-]?\d+(\.\d+)?)\%\s*/.exec(posStr)) { var line = Math.round(cm.lineCount() * Number(match[1]) / 100); if (/^[-+]/.test(match[1])) line = cur.line + line + 1; cm.setCursor(line - 1, cur.ch); } else if (match = /^\s*\:?\s*([\+\-]?\d+)\s*/.exec(posStr)) { cm.setCursor(interpretLine(cm, match[1]), cur.ch); } }); }; CodeMirror.keyMap["default"]["Alt-G"] = "jumpToLine"; });