audit all asserts

akkartik
Nov 18, 2023, 7:33 PM
G3DLS5OUO77V4MC6754KTETRCTVUBYBHMGR7MTV52IYYM7QA3ROQC

Dependencies

  • [2] ELJNEPW2 simplify cursor-on-screen check
  • [3] W6XUYQKP source: show files in MRU order
  • [4] I64IPGJX avoid saving fragments in lines
  • [5] SR4C3ZYZ add an assert
  • [6] AIBA4RWQ hide cursor in log browser window
  • [7] 6XCJX4DZ bugfix: inscript's bug
  • [8] 5SM6DRHK port inscript's bugfix to source editor
  • [9] 4PHGNJN6 assume starty can be nil in update
  • [10] GL4Q5WCV keep text from overflowing right margin
  • [11] IFTYOERM line.y -> line_cache.starty in a few more places
  • [12] 3OTESDW6 move drawing.starty into line cache
  • [13] 2RXZ3PGO beginning of a new approach to scroll+wrap
  • [14] SVJZZDC3 snapshot - no, that's all wrong
  • [15] KKHSOUW4 bugfix: drawings in source editor
  • [16] MXA3RZYK deduce left/right from state where possible
  • [17] BBLXANWI add some tests for rfind
  • [18] RT6EV6OP delegate update events to drawings
  • [19] JFFUF5AL override mouse state lookups in tests
  • [20] KV7GGVER couple of accidental globals
  • [21] 4KC7I3E2 make colors easier to edit
  • [22] 2L5MEZV3 experiment: new edit namespace
  • [23] F63Q4OV7 several bugfixes
  • [24] V5SYDHPQ start thinking of compute_fragments as a detail
  • [25] FM7UDV2G no, bring back that defense
  • [26] EAEGCJV5 rename
  • [27] QYIFOHW3 first test!
  • [28] BULPIBEG beginnings of a module for the text editor
  • [29] EGH7XDBK support non-text lines in Text.to2
  • [30] NDHQN23G done passing left/right margins everywhere
  • [31] SRVDX4I5 local var
  • [32] M6TH7VSZ rip out notion of Line_width
  • [33] PJEQCTBL add state arg to Drawing.update
  • [34] 3GFQP6IR stop saving the entire file when modifying drawings
  • [35] 5Q6NIG66 bugfix
  • [36] KECEMMMR extract couple of functions
  • [37] 2K2YDMFH ignore 'deleted' shapes when saving to disk
  • [38] YCDYGEZU include drawing index in a few places
  • [39] TGZAJUEF bring back a set of constants
  • [40] DRFE3B3Z mouse buttons are integers, not strings
  • [41] FKNXK2OA switch to line index in a function
  • [42] 3OKKTUT4 up and down arrow now moving by screen line where possible
  • [43] G54H3YG2 get rid of all bifold text
  • [44] LXTTOB33 extract a couple of files
  • [45] XNFTJHC4 split keyboard handling between Text and Drawing
  • [46] IMEJA43L snapshot
  • [47] VJ77YABH more efficient undo/redo
  • [48] GNQC72UX generalize a function
  • [49] ISOFHXB2 App.width can no longer take a Text
  • [50] VDFARWQX remove some support for long lines from source editor
  • [51] PXSQR2AD hide line numbers from log browser
  • [52] KZ5GAYRP this fixes the immediate regression
  • [53] 242L3OQX bugfix: ensure Cursor_line is always on a text line
  • [54] UHB4GARJ left/right margin -> left/right coordinates
  • [55] 4VQGE7RA new test
  • [56] KOYAJWE4 extract a couple more methods
  • [57] NYQ7HD4D move
  • [58] 2XLZCWZC bugfix: rectangles and squares are now saved
  • [59] ZPUQSPQP extract a few methods
  • [60] PX7DDEMO autosave slightly less aggressively
  • [61] 7JH2ZT3F add state arg to Drawing.draw
  • [62] MTJEVRJR add state arg to a few functions
  • [63] 65HNIAOS make freehand drawings smoother
  • [64] WJBZZQE4 fold together two largely similar cases
  • [65] 5FW7YOFT highlight selection while dragging
  • [66] LDFXFRUO bring a few things in sync between run and source
  • [67] H2DPLWMV snapshot: wrapping long lines at word boundaries
  • [68] VDJSUX2Q typos
  • [69] 5L7K4GBD clicking to the right of a wrapped line
  • [70] VHQCNMAR several more modules
  • [71] YTSPVDZH first successful pagedown test, first bug found by test
  • [72] HALS7E5U more clearly skip prints before screen top
  • [73] OI4FPFIN support drawings in the source editor
  • [74] PTDO2SOT add state arg to schedule_save
  • [75] NHNP76LG swap return values
  • [76] 4VKEE43Z bugfix
  • [77] WPW3AVFS more precise shape selection
  • [78] KMSL74GA support selections in the source editor
  • [79] 4EGQRXDA bugfix: naming points
  • [80] 3RGHOJ25 DRY some code
  • [81] 5BMR5HRT click to the left of a line
  • [82] U52E2XZN fix a crash
  • [83] MYC7XR5Q bugfix: lines that aren't drawn from the start
  • [84] UZVWYRTY missing temporary modes in a couple more places
  • [85] KTZQ57HV replace globals with args in a few functions
  • [86] P5QNVXSN drop final mention of state global beyond main.lua
  • [87] KURLAXXI clean up some prints
  • [88] DLQAEAC7 add state arg to Drawing.mouse_pressed
  • [89] 62PZGSUC optimization: moving cursor to next word
  • [90] MP2TBKU6 bugfix: crash in Text.up() after return
  • [91] 2ZYV7D3W handle tab characters
  • [92] 2WGRQI5E missing shape modes in a couple more places
  • [93] 2TQR4PSY add args to some functions
  • [94] Z5HLXU4P add state arg to a few functions
  • [95] Z4XRNDTR find text
  • [96] LSYLEVBD drop some redundant args when clearing the cache
  • [97] HGC5RGJP switch to line index in a function
  • [98] ZTK4QTZT extract a couple of functions
  • [99] GGWAHCLE minor cleanup and a todo for later
  • [100] XUGDTYW2 stop confusingly reading a global
  • [101] ILOA5BYF separate data structure for each line's cache data
  • [102] S2MISTTM add state arg to a few functions
  • [103] EHSUSZMK more idiomatic variable names
  • [104] 2LC3BM2N support other whitespace chars in word movements
  • [105] B4JEWKWI hide editor cursor while in file navigator
  • [106] V3EABA35 skip multiple consecutive whitespace
  • [107] TRNWIQN6 more precise height calculation when scrolling up as much as possible while keeping cursor on screen
  • [108] WLJCIXYM add state arg to a few functions
  • [109] KKMFQDR4 editing source code from within the app
  • [110] R3KXFRZN get rid of to_text
  • [111] GZ5WULJV switch source side to new screen-line-based render
  • [112] BYG5CEMV support for naming points
  • [113] LAW2O3NW extract variable Margin_left
  • [114] QCPXQ2E3 add state arg to a few functions
  • [115] LNUHQOGH start passing in Editor_state explicitly
  • [116] DJSIRUMD a more radical attempt at ignoring nil y's
  • [117] 7SFHSB47 rename
  • [118] BOFNXP5G clicking now moves the cursor even on long, wrapped lines
  • [119] WTDKUACN rectangle and square shapes
  • [120] SPSW74Y5 add state arg to Text.keychord_pressed
  • [121] TGHAJBES use line cache for drawings as well
  • [122] T57DTBX6 add args to some functions
  • [123] KJQ5FEYV round coordinates to integers in a few places
  • [124] HYEAFRZ2 split mouse_pressed events between Text and Drawing
  • [125] NQKFQSZE undo creating new drawings
  • [126] GGJEDJOO add args to some functions
  • [127] HVJKBW5U drop some unnecessary calls
  • [128] HIKLULFQ extract a function
  • [129] LIKTH6HM update stale source X-(
  • [130] 6DE7RBZ6 move mouse_released events to Drawing
  • [131] XRLJDW3W casting about for more helpers to extract..
  • [132] CWQIPU7U always show line numbers in source editor
  • [133] BJ2C6F2B ignore 'name' mode in a few places
  • [134] 2CK5QI7W make love event names consistent
  • [135] NFI42KGX more correct absolute path detection
  • [136] R3XGABER chunk up some long lines
  • [137] BXJMGTV2 hoist couple of variables out
  • [138] 2LEXWUW3 get rid of some ridiculous code
  • [139] F65ADDGL add state arg to a few functions
  • [140] 73OCE2MC after much struggle, a brute-force undo
  • [141] 3HVBAZPA add state arg to a few functions
  • [142] KCLRP4VW rename a couple of variables
  • [143] QXVD2RIF add state arg to Drawing.mouse_released
  • [144] BLWAYPKV extract a module
  • [145] PP2IIHL6 stop putting button state in a global
  • [146] AYE2VEGJ extract a couple of methods
  • [147] LK4ZW4BB bugfix
  • [148] WLWNS6FB a bug I've never run into
  • [149] LF7BWEG4 group all editor globals
  • [150] O7QH4N4W speeding up copy, attempt 1

Change contents

  • replacement in undo.lua at line 39
    [10.122][10.1:13]()
    assert(s)
    [10.122]
    [10.13]
    assert(s, 'failed to snapshot operation for undo history')
  • replacement in undo.lua at line 43
    [10.218][10.680:707]()
    assert(#State.lines > 0)
    [10.218]
    [10.22]
    assert(#State.lines > 0, 'failed to snapshot operation for undo history')
  • replacement in undo.lua at line 69
    [10.2268][10.2268:2288]()
    assert(false)
    [10.2268]
    [10.2288]
    assert(false, ('unknown line mode %s'):format(line.mode))
  • replacement in undo.lua at line 83
    [10.591][10.591:634]()
    assert(from.start_line == to.start_line)
    [10.591]
    [10.634]
    assert(from.start_line == to.start_line, 'failed to patch undo operation')
  • replacement in undo.lua at line 87
    [10.711][10.711:762]()
    assert(#to.lines == to.end_line-to.start_line+1)
    [10.711]
    [10.762]
    assert(#to.lines == to.end_line-to.start_line+1, 'failed to patch undo operation')
  • replacement in undo.lua at line 94
    [10.51][10.51:94]()
    assert(from.start_line == to.start_line)
    [10.51]
    [10.94]
    assert(from.start_line == to.start_line, 'failed to patch undo operation')
  • replacement in undo.lua at line 98
    [10.176][10.176:227]()
    assert(#to.lines == to.end_line-to.start_line+1)
    [10.176]
    [10.227]
    assert(#to.lines == to.end_line-to.start_line+1, 'failed to patch undo operation')
  • replacement in text.lua at line 15
    [10.63][4.162:214]()
    assert(#line_cache.screen_line_starting_pos >= 1)
    [10.63]
    [4.214]
    assert(#line_cache.screen_line_starting_pos >= 1, 'line cache missing screen line info')
  • replacement in text.lua at line 138
    [10.79][10.3:60]()
    assert(State.lines[State.cursor1.line].mode == 'text')
    [10.79]
    [10.79]
    assert(State.lines[State.cursor1.line].mode == 'text', 'line is not text')
  • replacement in text.lua at line 215
    [10.122][10.2810:2865](),[10.2810][10.2810:2865]()
    assert(Text.le1(State.screen_top1, State.cursor1))
    [10.122]
    [10.83]
    assert(Text.le1(State.screen_top1, State.cursor1), ('screen_top (line=%d,pos=%d) is below cursor (line=%d,pos=%d)'):format(State.screen_top1.line, State.screen_top1.pos, State.cursor1.line, State.cursor1.pos))
  • replacement in text.lua at line 393
    [10.816][10.3868:3925](),[10.3868][10.3868:3925]()
    assert(State.lines[State.cursor1.line].mode == 'text')
    [10.816]
    [10.3925]
    assert(State.lines[State.cursor1.line].mode == 'text', 'line is not text')
  • replacement in text.lua at line 419
    [10.1922][10.1922:1956]()
    assert(screen_line_index > 1)
    [10.1858]
    [10.3]
    assert(screen_line_index > 1, 'bumped up against top screen line in line')
  • replacement in text.lua at line 436
    [10.1280][10.5916:5973](),[10.5916][10.5916:5973]()
    assert(State.lines[State.cursor1.line].mode == 'text')
    [10.1280]
    [10.5973]
    assert(State.lines[State.cursor1.line].mode == 'text', 'line is not text')
  • replacement in text.lua at line 438
    [10.6132][5.3:31]()
    assert(State.cursor1.pos)
    [10.6132]
    [10.1281]
    assert(State.cursor1.pos, 'cursor has no pos')
  • replacement in text.lua at line 512
    [10.1135][10.8116:8150]()
    assert(State.cursor1.pos > 1)
    [10.1135]
    [10.8150]
    assert(State.cursor1.pos > 1, 'bumped up against start of line')
  • edit in text.lua at line 546
    [10.1013][10.1013:1036]()
    assert(start_offset)
  • replacement in text.lua at line 547
    [10.1079][10.1079:1115]()
    assert(end_offset > start_offset)
    [10.1079]
    [10.1115]
    assert(end_offset > start_offset, ('end_offset %d not > start_offset %d'):format(end_offset, start_offset))
  • replacement in text.lua at line 553
    [10.2106][10.188:245](),[10.188][10.188:245]()
    assert(State.lines[State.cursor1.line].mode == 'text')
    [10.2106]
    [10.245]
    assert(State.lines[State.cursor1.line].mode == 'text', 'line is not text')
  • replacement in text.lua at line 586
    [10.823][10.823:880]()
    assert(State.lines[State.cursor1.line].mode == 'text')
    [10.823]
    [10.880]
    assert(State.lines[State.cursor1.line].mode == 'text', 'line is not text')
  • replacement in text.lua at line 611
    [10.464][10.1642:1658]()
    assert(false)
    [10.464]
    [10.1]
    assert(false, ('invalid pos %d'):format(loc1.pos))
  • replacement in text.lua at line 625
    [7.1764][7.1764:1780]()
    assert(false)
    [7.1764]
    [7.1780]
    assert(false, ('invalid pos %d'):format(loc1.pos))
  • replacement in text.lua at line 650
    [10.2634][10.2634:2683]()
    assert(State.cursor1.line == #State.lines+1)
    [10.2634]
    [10.2683]
    assert(State.cursor1.line == #State.lines+1, 'tried to ensure bottom line of file is text, but failed')
  • replacement in text.lua at line 682
    [10.776][10.586:614](),[10.614][10.3409:3466]()
    assert(top2.line > 1)
    assert(State.lines[top2.line-1].mode == 'drawing')
    [10.776]
    [10.665]
    assert(top2.line > 1, 'tried to snap cursor to buttom of screen but failed')
    assert(State.lines[top2.line-1].mode == 'drawing', "expected a drawing but it's not")
  • replacement in text.lua at line 715
    [10.86][10.5639:5673]()
    assert(my >= line_cache.starty)
    [10.1078]
    [10.863]
    assert(my >= line_cache.starty, 'failed to map y pixel to line')
  • replacement in text.lua at line 738
    [10.1307][10.1307:1323]()
    assert(false)
    [10.1307]
    [10.464]
    assert(false, 'failed to map y pixel to line')
  • replacement in text.lua at line 804
    [10.1164][10.149:165]()
    assert(false)
    [10.1164]
    [10.1179]
    assert(false, 'failed to map x pixel to pos')
  • replacement in text.lua at line 835
    [10.7860][10.7860:7876]()
    assert(false)
    [10.7860]
    [10.3657]
    assert(false, 'failed to map x pixel to pos')
  • replacement in text.lua at line 866
    [10.8167][10.8167:8195]()
    assert(result.screen_pos)
    [10.8167]
    [10.8195]
    assert(result.screen_pos, 'failed to convert schema-1 coordinate to schema-2')
  • replacement in text.lua at line 908
    [10.1124][10.1124:1141]()
    assert(result)
    [10.1124]
    [10.1141]
    assert(result, "Text.offset returned nil; this is likely a failure to handle utf8")
  • replacement in source_undo.lua at line 39
    [10.1384][10.1384:1396]()
    assert(s)
    [10.1384]
    [10.1396]
    assert(s, 'failed to snapshot operation for undo history')
  • replacement in source_undo.lua at line 43
    [10.1431][10.1431:1458]()
    assert(#State.lines > 0)
    [10.1431]
    [10.1458]
    assert(#State.lines > 0, 'failed to snapshot operation for undo history')
  • replacement in source_undo.lua at line 68
    [10.2209][10.2209:2252]()
    print(line.mode)
    assert(false)
    [10.2209]
    [10.2252]
    assert(false, ('unknown line mode %s'):format(line.mode))
  • replacement in source_undo.lua at line 82
    [10.2401][10.2401:2444]()
    assert(from.start_line == to.start_line)
    [10.2401]
    [10.2444]
    assert(from.start_line == to.start_line, 'failed to patch undo operation')
  • replacement in source_undo.lua at line 86
    [10.2521][10.2521:2572]()
    assert(#to.lines == to.end_line-to.start_line+1)
    [10.2521]
    [10.2572]
    assert(#to.lines == to.end_line-to.start_line+1, 'failed to patch undo operation')
  • replacement in source_undo.lua at line 93
    [10.2712][10.2712:2755]()
    assert(from.start_line == to.start_line)
    [10.2712]
    [10.2755]
    assert(from.start_line == to.start_line, 'failed to patch undo operation')
  • replacement in source_undo.lua at line 97
    [10.2837][10.2837:2888]()
    assert(#to.lines == to.end_line-to.start_line+1)
    [10.2837]
    [10.2888]
    assert(#to.lines == to.end_line-to.start_line+1, 'failed to patch undo operation')
  • replacement in source_text.lua at line 20
    [10.87430][10.255:307]()
    assert(#line_cache.screen_line_starting_pos >= 1)
    [10.87430]
    [10.307]
    assert(#line_cache.screen_line_starting_pos >= 1, 'line cache missing screen line info')
  • replacement in source_text.lua at line 212
    [10.97835][10.7:64]()
    assert(State.lines[State.cursor1.line].mode == 'text')
    [10.97835]
    [10.523]
    assert(State.lines[State.cursor1.line].mode == 'text', 'line is not text')
  • replacement in source_text.lua at line 289
    [10.102856][10.102856:102911]()
    assert(Text.le1(State.screen_top1, State.cursor1))
    [10.102856]
    [10.102911]
    assert(Text.le1(State.screen_top1, State.cursor1), ('screen_top (line=%d,pos=%d) is below cursor (line=%d,pos=%d)'):format(State.screen_top1.line, State.screen_top1.pos, State.cursor1.line, State.cursor1.pos))
  • replacement in source_text.lua at line 455
    [10.109127][10.6890:6947]()
    assert(State.lines[State.cursor1.line].mode == 'text')
    [10.109127]
    [10.109238]
    assert(State.lines[State.cursor1.line].mode == 'text', 'line is not text')
  • replacement in source_text.lua at line 481
    [10.110541][10.110541:110575]()
    assert(screen_line_index > 1)
    [10.110541]
    [10.110575]
    assert(screen_line_index > 1, 'bumped up against top screen line in line')
  • replacement in source_text.lua at line 498
    [10.114836][10.8920:8977]()
    assert(State.lines[State.cursor1.line].mode == 'text')
    [10.114836]
    [10.114836]
    assert(State.lines[State.cursor1.line].mode == 'text', 'line is not text')
  • replacement in source_text.lua at line 500
    [10.114995][5.36:64]()
    assert(State.cursor1.pos)
    [10.114995]
    [10.114995]
    assert(State.cursor1.pos, 'cursor has no pos')
  • replacement in source_text.lua at line 574
    [10.120380][10.120380:120414]()
    assert(State.cursor1.pos > 1)
    [10.120380]
    [10.120414]
    assert(State.cursor1.pos > 1, 'bumped up against start of line')
  • edit in source_text.lua at line 608
    [10.122540][10.122540:122563]()
    assert(start_offset)
  • replacement in source_text.lua at line 609
    [10.122606][10.122606:122642]()
    assert(end_offset > start_offset)
    [10.122606]
    [10.122642]
    assert(end_offset > start_offset, ('end_offset %d not > start_offset %d'):format(end_offset, start_offset))
  • replacement in source_text.lua at line 615
    [10.122747][10.3367:3424]()
    assert(State.lines[State.cursor1.line].mode == 'text')
    [10.122747]
    [10.122864]
    assert(State.lines[State.cursor1.line].mode == 'text', 'line is not text')
  • replacement in source_text.lua at line 648
    [10.123998][10.9868:9925]()
    assert(State.lines[State.cursor1.line].mode == 'text')
    [10.123998]
    [10.124163]
    assert(State.lines[State.cursor1.line].mode == 'text', 'line is not text')
  • replacement in source_text.lua at line 673
    [10.125056][10.125056:125072]()
    assert(false)
    [10.125056]
    [10.125072]
    assert(false, ('invalid pos %d'):format(loc1.pos))
  • replacement in source_text.lua at line 687
    [8.4230][8.4230:4246]()
    assert(false)
    [8.4230]
    [8.4246]
    assert(false, ('invalid pos %d'):format(loc1.pos))
  • replacement in source_text.lua at line 712
    [10.10959][10.10959:11008]()
    assert(State.cursor1.line == #State.lines+1)
    [10.10959]
    [10.11008]
    assert(State.cursor1.line == #State.lines+1, 'tried to ensure bottom line of file is text, but failed')
  • replacement in source_text.lua at line 744
    [10.11422][10.11422:11507]()
    assert(top2.line > 1)
    assert(State.lines[top2.line-1].mode == 'drawing')
    [10.11422]
    [10.11507]
    assert(top2.line > 1, 'tried to snap cursor to buttom of screen but failed')
    assert(State.lines[top2.line-1].mode == 'drawing', "expected a drawing but it's not")
  • replacement in source_text.lua at line 777
    [10.130885][10.130885:130919]()
    assert(my >= line_cache.starty)
    [10.130885]
    [10.130919]
    assert(my >= line_cache.starty, 'failed to map y pixel to line')
  • replacement in source_text.lua at line 800
    [10.135357][10.135357:135373]()
    assert(false)
    [10.135357]
    [10.135373]
    assert(false, 'failed to map y pixel to line')
  • replacement in source_text.lua at line 866
    [10.138549][10.138549:138565]()
    assert(false)
    [10.138549]
    [10.138565]
    assert(false, 'failed to map x pixel to pos')
  • replacement in source_text.lua at line 897
    [10.139373][10.139373:139389]()
    assert(false)
    [10.139373]
    [10.139389]
    assert(false, 'failed to map x pixel to pos')
  • replacement in source_text.lua at line 928
    [10.140409][10.140409:140437]()
    assert(result.screen_pos)
    [10.140409]
    [10.141090]
    assert(result.screen_pos, 'failed to convert schema-1 coordinate to schema-2')
  • replacement in source_text.lua at line 970
    [10.142323][10.142323:142340]()
    assert(result)
    [10.142323]
    [10.142340]
    assert(result, "Text.offset returned nil; this is likely a failure to handle utf8")
  • replacement in source_select.lua at line 36
    [10.25073][10.25073:25104]()
    assert(maxl == line_index)
    [10.25073]
    [10.25104]
    assert(maxl == line_index, ('maxl %d not equal to line_index %d'):format(maxl, line_index))
  • replacement in source_select.lua at line 39
    [10.25144][10.25144:25175]()
    assert(minl == line_index)
    [10.25144]
    [10.25175]
    assert(minl == line_index, ('minl %d not equal to line_index %d'):format(minl, line_index))
  • replacement in source_select.lua at line 42
    [10.25203][10.25203:25251]()
    assert(minl == maxl and minl == line_index)
    [10.25203]
    [10.25251]
    assert(minl == maxl and minl == line_index, ('minl %d, maxl %d and line_index %d are not all equal'):format(minl, maxl, line_index))
  • replacement in source_select.lua at line 130
    [10.28832][10.28832:28854]()
    assert(minl < maxl)
    [10.28832]
    [10.28854]
    assert(minl < maxl, ('minl %d not < maxl %d'):format(minl, maxl))
  • replacement in source_select.lua at line 157
    [10.29732][10.29732:29754]()
    assert(minl < maxl)
    [10.29732]
    [10.29754]
    assert(minl < maxl, ('minl %d not < maxl %d'):format(minl, maxl))
  • replacement in source_file.lua at line 66
    [10.12869][10.12869:12886]()
    assert(line)
    [10.12869]
    [10.12886]
    assert(line, 'drawing in file is incomplete')
  • replacement in source_file.lua at line 91
    [10.14202][10.14202:14246]()
    print(shape.mode)
    assert(false)
    [10.14202]
    [10.14246]
    assert(false, ('unknown drawing mode %s'):format(shape.mode))
  • replacement in source_file.lua at line 125
    [10.15474][10.15474:15518]()
    print(shape.mode)
    assert(false)
    [10.15474]
    [10.15518]
    assert(false, ('unknown drawing mode %s'):format(shape.mode))
  • replacement in source_file.lua at line 163
    [10.16369][10.16369:16383]()
    assert(i)
    [10.16369]
    [10.16383]
    assert(i, 'drawing in array is incomplete')
  • replacement in source_file.lua at line 189
    [10.17716][10.17716:17760]()
    print(shape.mode)
    assert(false)
    [10.17716]
    [10.17760]
    assert(false, ('unknown drawing mode %s'):format(shape.mode))
  • replacement in source_edit.lua at line 161
    [10.155429][10.602:776](),[10.776][10.155473:155530](),[10.155473][10.155473:155530](),[10.155530][10.6410:6506](),[10.6506][10.155670:155694](),[10.155670][10.155670:155694]()
    if #State.lines ~= #State.line_cache then
    print(('line_cache is out of date; %d when it should be %d'):format(#State.line_cache, #State.lines))
    assert(false)
    end
    if not Text.le1(State.screen_top1, State.cursor1) then
    print(State.screen_top1.line, State.screen_top1.pos, State.cursor1.line, State.cursor1.pos)
    assert(false)
    end
    [10.155429]
    [10.155694]
    assert(#State.lines == #State.line_cache, ('line_cache is out of date; %d elements when it should be %d'):format(#State.line_cache, #State.lines))
    assert(Text.le1(State.screen_top1, State.cursor1), ('screen_top (line=%d,pos=%d) is below cursor (line=%d,pos=%d)'):format(State.screen_top1.line, State.screen_top1.pos, State.cursor1.line, State.cursor1.pos))
  • replacement in source_edit.lua at line 206
    [10.21468][10.21468:21511]()
    print(line.mode)
    assert(false)
    [10.21468]
    [10.156342]
    assert(false, ('unknown line mode %s'):format(line.mode))
  • replacement in select.lua at line 36
    [10.45604][10.45604:45635]()
    assert(maxl == line_index)
    [10.45604]
    [10.45635]
    assert(maxl == line_index, ('maxl %d not equal to line_index %d'):format(maxl, line_index))
  • replacement in select.lua at line 39
    [10.45675][10.45675:45706]()
    assert(minl == line_index)
    [10.45675]
    [10.45706]
    assert(minl == line_index, ('minl %d not equal to line_index %d'):format(minl, line_index))
  • replacement in select.lua at line 42
    [10.45734][10.45734:45782]()
    assert(minl == maxl and minl == line_index)
    [10.45734]
    [10.45782]
    assert(minl == maxl and minl == line_index, ('minl %d, maxl %d and line_index %d are not all equal'):format(minl, maxl, line_index))
  • replacement in select.lua at line 130
    [10.47652][10.47652:47674]()
    assert(minl < maxl)
    [10.47652]
    [10.2897]
    assert(minl < maxl, ('minl %d not < maxl %d'):format(minl, maxl))
  • replacement in select.lua at line 157
    [10.48425][10.48425:48447]()
    assert(minl < maxl)
    [10.48425]
    [10.3510]
    assert(minl < maxl, ('minl %d not < maxl %d'):format(minl, maxl))
  • replacement in search.lua at line 142
    [10.52011][10.52011:52037]()
    assert (endpos >= #pat)
    [10.52011]
    [10.52037]
    assert (endpos >= #pat, ('rfind: endpos %d should be >= #pat %d at this point'):format(endpos, #pat))
  • replacement in log_browser.lua at line 78
    [6.148][10.194820:194864](),[10.194820][10.194820:194864]()
    assert(#State.lines == #State.line_cache)
    [6.148]
    [10.194864]
    assert(#State.lines == #State.line_cache, ('line_cache is out of date; %d elements when it should be %d'):format(#State.line_cache, #State.lines))
  • replacement in log_browser.lua at line 98
    [10.358][10.195959:195997](),[10.195959][10.195959:195997]()
    else assert(line.section_end)
    [10.358]
    [10.195997]
    else assert(line.section_end, "log line has a section name, but it's neither the start nor end of a section")
  • replacement in geom.lua at line 41
    [10.12514][10.12514:12554]()
    print(shape.mode)
    assert(false)
    [10.12514]
    [10.12554]
    assert(false, ('unknown drawing mode %s'):format(shape.mode))
  • replacement in file.lua at line 58
    [10.16435][10.16435:16452]()
    assert(line)
    [10.16435]
    [10.16452]
    assert(line, 'drawing in file is incomplete')
  • replacement in file.lua at line 83
    [10.244][10.244:288]()
    print(shape.mode)
    assert(false)
    [10.244]
    [10.17060]
    assert(false, ('unknown drawing mode %s'):format(shape.mode))
  • replacement in file.lua at line 117
    [10.394][10.394:438]()
    print(shape.mode)
    assert(false)
    [10.394]
    [10.18168]
    assert(false, ('unknown drawing mode %s'):format(shape.mode))
  • replacement in file.lua at line 153
    [10.2092][10.2092:2106]()
    assert(i)
    [10.2092]
    [10.2801]
    assert(i, 'drawing in array is incomplete')
  • replacement in file.lua at line 179
    [10.3157][10.3157:3201]()
    print(shape.mode)
    assert(false)
    [10.3157]
    [10.3201]
    assert(false, ('unknown drawing mode %s'):format(shape.mode))
  • replacement in edit.lua at line 83
    [10.3184][10.97073:97108]()
    current_drawing_mode = 'line',
    [10.3184]
    [10.97108]
    current_drawing_mode = 'line', -- one of the available shape modes
  • replacement in edit.lua at line 160
    [10.1023][10.642:816](),[10.816][10.988:1165](),[10.1895][10.988:1165]()
    if #State.lines ~= #State.line_cache then
    print(('line_cache is out of date; %d when it should be %d'):format(#State.line_cache, #State.lines))
    assert(false)
    end
    if not Text.le1(State.screen_top1, State.cursor1) then
    print(State.screen_top1.line, State.screen_top1.pos, State.cursor1.line, State.cursor1.pos)
    assert(false)
    end
    [10.1023]
    [2.268]
    assert(#State.lines == #State.line_cache, ('line_cache is out of date; %d elements when it should be %d'):format(#State.line_cache, #State.lines))
    assert(Text.le1(State.screen_top1, State.cursor1), ('screen_top (line=%d,pos=%d) is below cursor (line=%d,pos=%d)'):format(State.screen_top1.line, State.screen_top1.pos, State.cursor1.line, State.cursor1.pos))
  • replacement in edit.lua at line 201
    [10.5492][10.1067:1110]()
    print(line.mode)
    assert(false)
    [10.5492]
    [10.5845]
    assert(false, ('unknown line mode %s'):format(line.mode))
  • edit in drawing.lua at line 36
    [10.935][10.935:953]()
    assert(shape)
  • replacement in drawing.lua at line 115
    [10.1687][10.1687:1727]()
    print(shape.mode)
    assert(false)
    [10.1687]
    [10.1727]
    assert(false, ('unknown drawing mode %s'):format(shape.mode))
  • replacement in drawing.lua at line 208
    [10.4021][10.4021:4061]()
    print(shape.mode)
    assert(false)
    [10.4021]
    [10.4352]
    assert(false, ('unknown drawing mode %s'):format(shape.mode))
  • replacement in drawing.lua at line 239
    [10.4193][10.1263:1301](),[10.1301][10.4225:4243](),[10.129908][10.4225:4243](),[10.4225][10.4225:4243]()
    print(State.current_drawing_mode)
    assert(false)
    [10.4193]
    [10.1671]
    assert(false, ('unknown drawing mode %s'):format(State.current_drawing_mode))
  • replacement in drawing.lua at line 254
    [10.179][10.218:254](),[9.207][10.218:254](),[10.225][10.218:254](),[10.2924][10.218:254](),[10.130025][10.218:254](),[10.218][10.218:254]()
    assert(drawing.mode == 'drawing')
    [9.207]
    [10.17]
    assert(drawing.mode == 'drawing', 'Drawing.update: line is not a drawing')
  • replacement in drawing.lua at line 341
    [10.1574][10.1574:1621]()
    assert(#drawing.pending.vertices <= 2)
    [10.1574]
    [10.1621]
    assert(#drawing.pending.vertices <= 2, 'Drawing.mouse_release: rectangle has too many pending vertices')
  • replacement in drawing.lua at line 356
    [10.2272][10.2272:2319]()
    assert(#drawing.pending.vertices <= 2)
    [10.2272]
    [10.2319]
    assert(#drawing.pending.vertices <= 2, 'Drawing.mouse_release: square has too many pending vertices')
  • replacement in drawing.lua at line 385
    [10.6342][10.3819:3855](),[10.3855][10.6384:6406](),[10.6384][10.6384:6406]()
    print(drawing.pending.mode)
    assert(false)
    [10.6342]
    [10.3044]
    assert(false, ('unknown drawing mode %s'):format(drawing.pending.mode))
  • replacement in drawing.lua at line 543
    [10.11016][10.11016:11040]()
    assert(idx)
    [10.11016]
    [10.11040]
    assert(idx, 'point to delete is not in vertices')
  • edit in drawing.lua at line 639
    [10.19849][10.19849:19873]()
    assert(shape)
  • edit in drawing.lua at line 656
    [10.20452][10.20452:20476]()
    assert(point)
  • replacement in drawing.lua at line 692
    [10.21459][10.21459:21499]()
    print(shape.mode)
    assert(false)
    [10.21459]
    [10.186]
    assert(false, ('unknown drawing mode %s'):format(shape.mode))
  • replacement in drawing.lua at line 697
    [10.230][10.230:265]()
    assert(shape.mode == 'freehand')
    [10.230]
    [10.265]
    assert(shape.mode == 'freehand', 'can only smoothen freehand shapes')
  • replacement in commands.lua at line 139
    [3.162][3.162:178]()
    assert(index)
    [3.162]
    [3.178]
    assert(index, 'file missing from manifest')