FBI-1684: [MANTIS - 22275] Scroll in trigger editor jumps several lines up when
scrolling with the mouse scroll wheel resolve observations
This commit is contained in:
23
gulliver/js/codemirror/mode/haskell/haskell.js
vendored
23
gulliver/js/codemirror/mode/haskell/haskell.js
vendored
@@ -1,3 +1,16 @@
|
||||
// CodeMirror, copyright (c) by Marijn Haverbeke and others
|
||||
// Distributed under an MIT license: http://codemirror.net/LICENSE
|
||||
|
||||
(function(mod) {
|
||||
if (typeof exports == "object" && typeof module == "object") // CommonJS
|
||||
mod(require("../../lib/codemirror"));
|
||||
else if (typeof define == "function" && define.amd) // AMD
|
||||
define(["../../lib/codemirror"], mod);
|
||||
else // Plain browser env
|
||||
mod(CodeMirror);
|
||||
})(function(CodeMirror) {
|
||||
"use strict";
|
||||
|
||||
CodeMirror.defineMode("haskell", function(_config, modeConfig) {
|
||||
|
||||
function switchState(source, setState, f) {
|
||||
@@ -11,7 +24,7 @@ CodeMirror.defineMode("haskell", function(_config, modeConfig) {
|
||||
var digitRE = /\d/;
|
||||
var hexitRE = /[0-9A-Fa-f]/;
|
||||
var octitRE = /[0-7]/;
|
||||
var idRE = /[a-z_A-Z0-9']/;
|
||||
var idRE = /[a-z_A-Z0-9'\xa1-\uffff]/;
|
||||
var symbolRE = /[-!#$%&*+.\/<=>?@\\^|~:]/;
|
||||
var specialRE = /[(),;[\]`{}]/;
|
||||
var whiteCharRE = /[ \t\v\f]/; // newlines are handled in tokenizer
|
||||
@@ -43,7 +56,7 @@ CodeMirror.defineMode("haskell", function(_config, modeConfig) {
|
||||
if (source.eat('\'')) {
|
||||
return "string";
|
||||
}
|
||||
return "error";
|
||||
return "string error";
|
||||
}
|
||||
|
||||
if (ch == '"') {
|
||||
@@ -153,7 +166,7 @@ CodeMirror.defineMode("haskell", function(_config, modeConfig) {
|
||||
}
|
||||
}
|
||||
setState(normal);
|
||||
return "error";
|
||||
return "string error";
|
||||
}
|
||||
|
||||
function stringGap(source, setState) {
|
||||
@@ -181,7 +194,7 @@ CodeMirror.defineMode("haskell", function(_config, modeConfig) {
|
||||
"module", "newtype", "of", "then", "type", "where", "_");
|
||||
|
||||
setType("keyword")(
|
||||
"\.\.", ":", "::", "=", "\\", "\"", "<-", "->", "@", "~", "=>");
|
||||
"\.\.", ":", "::", "=", "\\", "<-", "->", "@", "~", "=>");
|
||||
|
||||
setType("builtin")(
|
||||
"!!", "$!", "$", "&&", "+", "++", "-", ".", "/", "/=", "<", "<=", "=<<",
|
||||
@@ -250,3 +263,5 @@ CodeMirror.defineMode("haskell", function(_config, modeConfig) {
|
||||
});
|
||||
|
||||
CodeMirror.defineMIME("text/x-haskell", "haskell");
|
||||
|
||||
});
|
||||
|
||||
Reference in New Issue
Block a user