11import { deleteNearSelection } from "./deleteNearSelection"
2- import { changeLine } from "../model/changes"
32import { commands } from "./commands"
43import { attachDoc } from "../model/document_data"
54import { activeElt , addClass , rmClass } from "../util/dom"
@@ -18,9 +17,9 @@ import { addToScrollPos, calculateScrollPos, ensureCursorVisible, resolveScrollT
1817import { heightAtLine } from "../line/spans"
1918import { updateGutterSpace } from "../display/update_display"
2019import { lineLeft , lineRight , moveLogically , moveVisually } from "../util/bidi"
21- import { indexOf , insertSorted , isEmpty , isWordChar , sel_dontScroll , sel_move } from "../util/misc"
20+ import { indexOf , insertSorted , isWordChar , sel_dontScroll , sel_move } from "../util/misc"
2221import { signalLater } from "../util/operation_group"
23- import { getLine , isLine , lineAtHeight , lineNo } from "../line/utils_line"
22+ import { getLine , isLine , lineAtHeight } from "../line/utils_line"
2423import { regChange , regLineChange } from "../display/view_tracking"
2524
2625// The publicly visible API. Note that methodOp(f) means
@@ -218,43 +217,6 @@ export default function(CodeMirror) {
218217 defaultTextHeight : function ( ) { return textHeight ( this . display ) } ,
219218 defaultCharWidth : function ( ) { return charWidth ( this . display ) } ,
220219
221- setGutterMarker : methodOp ( function ( line , gutterID , value ) {
222- return changeLine ( this . doc , line , "gutter" , line => {
223- let markers = line . gutterMarkers || ( line . gutterMarkers = { } )
224- markers [ gutterID ] = value
225- if ( ! value && isEmpty ( markers ) ) line . gutterMarkers = null
226- return true
227- } )
228- } ) ,
229-
230- clearGutter : methodOp ( function ( gutterID ) {
231- let doc = this . doc , i = doc . first
232- doc . iter ( line => {
233- if ( line . gutterMarkers && line . gutterMarkers [ gutterID ] ) {
234- line . gutterMarkers [ gutterID ] = null
235- regLineChange ( this , i , "gutter" )
236- if ( isEmpty ( line . gutterMarkers ) ) line . gutterMarkers = null
237- }
238- ++ i
239- } )
240- } ) ,
241-
242- lineInfo : function ( line ) {
243- let n
244- if ( typeof line == "number" ) {
245- if ( ! isLine ( this . doc , line ) ) return null
246- n = line
247- line = getLine ( this . doc , line )
248- if ( ! line ) return null
249- } else {
250- n = lineNo ( line )
251- if ( n == null ) return null
252- }
253- return { line : n , handle : line , text : line . text , gutterMarkers : line . gutterMarkers ,
254- textClass : line . textClass , bgClass : line . bgClass , wrapClass : line . wrapClass ,
255- widgets : line . widgets }
256- } ,
257-
258220 getViewport : function ( ) { return { from : this . display . viewFrom , to : this . display . viewTo } } ,
259221
260222 addWidget : function ( pos , node , scroll , vert , horiz ) {
0 commit comments