1-
2-
3- import { Code , Edit , Change , Position , Operation } from "./code" ;
1+ import { Code , Change , Position , Operation } from "./code" ;
42import { vesper } from './theme' ;
5- import { Renderer } from './renderer' ;
3+ import { Renderer } from './renderer/Renderer ' ;
64import { getPosFromMouse } from './mouse' ;
75import { Selection } from "./selection" ;
86import { Completion , CompletionRequest , DefinitionRequest , DefinitionResponse } from "./lsp" ;
@@ -18,7 +16,7 @@ import {
1816
1917import './styles.css' ;
2018import { Search } from "./search" ;
21- import { computeGitChangesDetailed as computeGitChanges , ChangeType , DiffInfo } from "./diff" ;
19+ import { computeGitChanges , DiffInfo } from "./diff" ;
2220
2321export interface EditorSettings {
2422 lineHeight : number ;
@@ -32,7 +30,7 @@ export interface EditorState {
3230 runLines : number [ ] ;
3331 errorLines : Map < number , string > ;
3432 settings : EditorSettings ;
35- diffResult ?: Map < number , DiffInfo > ;
33+ diffs ?: Map < number , DiffInfo > ;
3634}
3735
3836export class AnycodeEditor {
@@ -44,8 +42,6 @@ export class AnycodeEditor {
4442 private buttonsColumn ! : HTMLDivElement ;
4543 private gutter ! : HTMLDivElement ;
4644 private codeContent ! : HTMLDivElement ;
47- private isFocused : boolean ;
48- private maxLineWidth = 0 ;
4945
5046 private isMouseSelecting : boolean = false ;
5147 private selection : Selection | null = null ;
@@ -101,7 +97,6 @@ export class AnycodeEditor {
10197 addCssToDocument ( css , 'anyeditor-theme' ) ;
10298 this . createDomElements ( ) ;
10399 this . renderer = new Renderer ( this . container , this . buttonsColumn , this . gutter , this . codeContent ) ;
104- this . isFocused = true ;
105100 }
106101
107102 private createDomElements ( ) {
@@ -304,7 +299,7 @@ export class AnycodeEditor {
304299 lineHeight : this . settings . lineHeight ,
305300 buffer : this . settings . buffer ,
306301 } ,
307- diffResult : this . diffs ,
302+ diffs : this . diffs ,
308303 } ;
309304 }
310305
@@ -383,7 +378,6 @@ export class AnycodeEditor {
383378 // console.log('Editor lost focus');
384379 this . isMouseSelecting = false ;
385380 this . isWordSelection = false ;
386- this . isFocused = false ;
387381
388382 if ( this . autoScrollTimer ) {
389383 cancelAnimationFrame ( this . autoScrollTimer ) ;
@@ -393,7 +387,6 @@ export class AnycodeEditor {
393387
394388 private handleFocus ( e : FocusEvent ) {
395389 // console.log('Editor focus');
396- this . isFocused = true ;
397390 this . search . setNeedsFocus ( false ) ;
398391 }
399392
@@ -1109,7 +1102,7 @@ export class AnycodeEditor {
11091102 this . renderer . clearAllDiffs ( ) ;
11101103 }
11111104
1112- this . renderer . verifyDiffRendering ( this . diffs ) ;
1105+ this . renderer . verifyDiffs ( this . diffs ) ;
11131106 }
11141107
11151108}
0 commit comments