use deepcopy where possible

akkartik
Jun 23, 2024, 5:54 PM
EB6LHFJRSQIQWC3M5CZWOLG7PX3HHO2ZQ2TGMBCOLUBDZSP7CJZAC

Dependencies

  • [2] ZS5IYZH5 stop caching screen_bottom1
  • [3] ZPUQSPQP extract a few methods
  • [4] OI4FPFIN support drawings in the source editor
  • [5] 5SM6DRHK port inscript's bugfix to source editor
  • [6] 656FM555 bugfix: clear selection when clicking above or below lines
  • [7] 2TCIWW6Z stop caching starty
  • [8] QCPXQ2E3 add state arg to a few functions
  • [9] 6XCJX4DZ bugfix: inscript's bug
  • [10] SPSW74Y5 add state arg to Text.keychord_pressed
  • [11] G54H3YG2 get rid of all bifold text
  • [12] KKMFQDR4 editing source code from within the app
  • [13] DHI6IJCN selecting text and deleting selections
  • [14] MXA3RZYK deduce left/right from state where possible
  • [15] HTWAM4NZ bugfix: scrolling in left/right movements
  • [16] WOXIYUTL bugfix: manage screen_top and cursor when resizing
  • [17] GFXWHTE6 mouse wheel support
  • [18] Z5HLXU4P add state arg to a few functions
  • [19] VDFARWQX remove some support for long lines from source editor
  • [20] LNUHQOGH start passing in Editor_state explicitly
  • [21] ELJNEPW2 simplify cursor-on-screen check
  • [22] CVSRHMJ2 experiment: slightly adaptive scrolling
  • [23] 2MGBV7NP bugfix: crash when using mouse wheel
  • [24] KMSL74GA support selections in the source editor
  • [*] BULPIBEG beginnings of a module for the text editor
  • [*] 2L5MEZV3 experiment: new edit namespace

Change contents

  • replacement in text.lua at line 267
    [3.4578][3.4578:4652]()
    State.selection1 = {line=State.cursor1.line, pos=State.cursor1.pos}
    [3.4578]
    [3.8796]
    State.selection1 = deepcopy(State.cursor1)
  • replacement in text.lua at line 272
    [3.4765][3.4765:4839]()
    State.selection1 = {line=State.cursor1.line, pos=State.cursor1.pos}
    [3.4765]
    [3.8944]
    State.selection1 = deepcopy(State.cursor1)
  • replacement in text.lua at line 284
    [3.5158][3.5158:5232]()
    State.selection1 = {line=State.cursor1.line, pos=State.cursor1.pos}
    [3.5158]
    [3.9213]
    State.selection1 = deepcopy(State.cursor1)
  • replacement in text.lua at line 289
    [3.5350][3.5350:5424]()
    State.selection1 = {line=State.cursor1.line, pos=State.cursor1.pos}
    [3.5350]
    [3.9368]
    State.selection1 = deepcopy(State.cursor1)
  • replacement in text.lua at line 300
    [3.5674][3.5674:5748]()
    State.selection1 = {line=State.cursor1.line, pos=State.cursor1.pos}
    [3.5674]
    [3.9640]
    State.selection1 = deepcopy(State.cursor1)
  • replacement in text.lua at line 305
    [3.5790][3.5790:5864]()
    State.selection1 = {line=State.cursor1.line, pos=State.cursor1.pos}
    [3.5790]
    [3.9790]
    State.selection1 = deepcopy(State.cursor1)
  • replacement in text.lua at line 316
    [3.6176][3.6176:6250]()
    State.selection1 = {line=State.cursor1.line, pos=State.cursor1.pos}
    [3.6176]
    [3.10110]
    State.selection1 = deepcopy(State.cursor1)
  • replacement in text.lua at line 321
    [3.6361][3.6361:6435]()
    State.selection1 = {line=State.cursor1.line, pos=State.cursor1.pos}
    [3.6361]
    [3.10255]
    State.selection1 = deepcopy(State.cursor1)
  • replacement in text.lua at line 332
    [3.6748][3.6748:6822]()
    State.selection1 = {line=State.cursor1.line, pos=State.cursor1.pos}
    [3.6748]
    [3.10526]
    State.selection1 = deepcopy(State.cursor1)
  • replacement in text.lua at line 337
    [3.6937][3.6937:7011]()
    State.selection1 = {line=State.cursor1.line, pos=State.cursor1.pos}
    [3.6937]
    [3.10679]
    State.selection1 = deepcopy(State.cursor1)
  • replacement in text.lua at line 354
    [2.407][2.407:482]()
    State.cursor1 = {line=State.screen_top1.line, pos=State.screen_top1.pos}
    [2.407]
    [2.482]
    State.cursor1 = deepcopy(State.screen_top1)
  • replacement in text.lua at line 403
    [2.1239][3.339:414](),[3.3692][3.339:414]()
    State.cursor1 = {line=State.screen_top1.line, pos=State.screen_top1.pos}
    [2.1239]
    [3.707]
    State.cursor1 = deepcopy(State.screen_top1)
  • replacement in text.lua at line 523
    [3.7649][3.7649:7731]()
    State.screen_top1 = {line=State.cursor1.line, pos=State.cursor1.pos} -- copy
    [3.7649]
    [3.6249]
    State.screen_top1 = deepcopy(State.cursor1)
  • replacement in text.lua at line 1032
    [3.5461][3.5461:5538]()
    State.cursor1 = {line=State.screen_top1.line, pos=State.screen_top1.pos}
    [3.5461]
    [2.3775]
    State.cursor1 = deepcopy(State.screen_top1)
  • replacement in source_text.lua at line 341
    [3.21621][3.1086:1160]()
    State.selection1 = {line=State.cursor1.line, pos=State.cursor1.pos}
    [3.21621]
    [3.21720]
    State.selection1 = deepcopy(State.cursor1)
  • replacement in source_text.lua at line 346
    [3.21770][3.1161:1235]()
    State.selection1 = {line=State.cursor1.line, pos=State.cursor1.pos}
    [3.21770]
    [3.21869]
    State.selection1 = deepcopy(State.cursor1)
  • replacement in source_text.lua at line 358
    [3.21973][3.1236:1310]()
    State.selection1 = {line=State.cursor1.line, pos=State.cursor1.pos}
    [3.21973]
    [3.22072]
    State.selection1 = deepcopy(State.cursor1)
  • replacement in source_text.lua at line 363
    [3.22122][3.1311:1385]()
    State.selection1 = {line=State.cursor1.line, pos=State.cursor1.pos}
    [3.22122]
    [3.22221]
    State.selection1 = deepcopy(State.cursor1)
  • replacement in source_text.lua at line 374
    [3.22325][3.1386:1460]()
    State.selection1 = {line=State.cursor1.line, pos=State.cursor1.pos}
    [3.22325]
    [3.22424]
    State.selection1 = deepcopy(State.cursor1)
  • replacement in source_text.lua at line 379
    [3.22474][3.1461:1535]()
    State.selection1 = {line=State.cursor1.line, pos=State.cursor1.pos}
    [3.22474]
    [3.22573]
    State.selection1 = deepcopy(State.cursor1)
  • replacement in source_text.lua at line 390
    [3.22677][3.1536:1610]()
    State.selection1 = {line=State.cursor1.line, pos=State.cursor1.pos}
    [3.22677]
    [3.22776]
    State.selection1 = deepcopy(State.cursor1)
  • replacement in source_text.lua at line 395
    [3.22826][3.1611:1685]()
    State.selection1 = {line=State.cursor1.line, pos=State.cursor1.pos}
    [3.22826]
    [3.22925]
    State.selection1 = deepcopy(State.cursor1)
  • replacement in source_text.lua at line 406
    [3.23029][3.1686:1760]()
    State.selection1 = {line=State.cursor1.line, pos=State.cursor1.pos}
    [3.23029]
    [3.23128]
    State.selection1 = deepcopy(State.cursor1)
  • replacement in source_text.lua at line 411
    [3.23178][3.1761:1835]()
    State.selection1 = {line=State.cursor1.line, pos=State.cursor1.pos}
    [3.23178]
    [3.23277]
    State.selection1 = deepcopy(State.cursor1)
  • replacement in source_text.lua at line 428
    [2.4299][2.4299:4374]()
    State.cursor1 = {line=State.screen_top1.line, pos=State.screen_top1.pos}
    [2.4299]
    [2.4374]
    State.cursor1 = deepcopy(State.screen_top1)
  • replacement in source_text.lua at line 477
    [2.5131][3.2843:2918](),[3.108742][3.2843:2918]()
    State.cursor1 = {line=State.screen_top1.line, pos=State.screen_top1.pos}
    [2.5131]
    [3.108846]
    State.cursor1 = deepcopy(State.screen_top1)
  • replacement in source_text.lua at line 597
    [3.118525][3.3001:3083]()
    State.screen_top1 = {line=State.cursor1.line, pos=State.cursor1.pos} -- copy
    [3.118525]
    [3.118591]
    State.screen_top1 = deepcopy(State.cursor1)
  • replacement in source_text.lua at line 1106
    [3.145563][3.145563:145640]()
    State.cursor1 = {line=State.screen_top1.line, pos=State.screen_top1.pos}
    [3.145563]
    [2.7667]
    State.cursor1 = deepcopy(State.screen_top1)
  • replacement in source_edit.lua at line 311
    [3.2015][3.2015:2094]()
    State.cursor1 = {line=State.screen_top1.line, pos=State.screen_top1.pos}
    [3.2015]
    [3.2094]
    State.cursor1 = deepcopy(State.screen_top1)
  • replacement in source_edit.lua at line 354
    [3.84][3.84:161]()
    State.cursor1 = {line=State.screen_top1.line, pos=State.screen_top1.pos}
    [3.84]
    [3.12]
    State.cursor1 = deepcopy(State.screen_top1)
  • replacement in edit.lua at line 306
    [3.2934][3.2934:3013]()
    State.cursor1 = {line=State.screen_top1.line, pos=State.screen_top1.pos}
    [3.2934]
    [3.3013]
    State.cursor1 = deepcopy(State.screen_top1)
  • replacement in edit.lua at line 349
    [3.1937][3.1937:2014]()
    State.cursor1 = {line=State.screen_top1.line, pos=State.screen_top1.pos}
    [3.1937]
    [3.121]
    State.cursor1 = deepcopy(State.screen_top1)