about summary refs log tree commit diff stats
path: root/go.sum
Commit message (Expand)AuthorAgeFilesLines
* Update go-message, fixes various bugsReto Brunner2020-07-091-0/+2
* creak/pty got force pushed: fix versionReto Brunner2020-05-081-4/+2
* Use stdout as controlling terminalGuillaume J. Charmes2020-05-061-0/+2
* Revert "Dont detach process under vterm"Drew DeVault2020-05-061-2/+0
* Dont detach process under vtermGuillaume J. Charmes2020-05-061-0/+2
* Bump ProtonMail/crypto to fix build on OpenBSDAnirudh Oppiliappan2020-04-201-2/+2
* go mod tidy, updated go.sumReto Brunner2020-04-061-0/+13
* Mark sent messages as "seen" in maildirGalen Abell2020-03-091-1/+0
* go.sum: re-add notmuchReto Brunner2020-03-051-0/+1
* Initial support for PGP decryption & signaturesDrew DeVault2020-03-031-26/+8
* Update dependenciesSimon Ser2020-03-031-54/+43
* Mark sent messages as "seen" in maildirGalen Abell2020-03-031-0/+6
* Contextual UI ConfigurationSrivathsan Murali2020-01-241-0/+2
* Switch back to upstream pty libraryBen Fiedler2020-01-161-2/+2
* Update go-maildir to latestBen Burwell2019-12-191-0/+2
* Add support for AUTH LOGIN submissionLuke Drummond2019-11-011-0/+2
* notmuch: sync maildir flagsReto Brunner2019-09-161-0/+2
* upgrade go-messageReto Brunner2019-08-201-2/+2
* bump go-message, fixes address list parsing failureReto Brunner2019-08-161-8/+6
* add github.com/zenhack/go.notmuchReto Brunner2019-08-081-2/+2
* Update tcellDrew DeVault2019-08-071-0/+2
* Update tcellDrew DeVault2019-07-271-0/+3
* Update dependenciesSimon Ser2019-07-271-34/+41
* Use latest go-maildirBen Burwell2019-07-191-0/+2
* maildir: Watch for new messagesBen Burwell2019-07-171-0/+2
* Handle the invalid "utf8" encodingBen Burwell2019-07-121-0/+2
* Add maildir backend workerBen Burwell2019-07-121-0/+2
* Support imaps with oauthbearer authentication (Gmail)Frode Aannevik2019-07-111-0/+11
* Update tcellDrew DeVault2019-06-151-0/+2
* Update reply to use getopt posix optind formatClayton Craft2019-06-091-0/+2
* Update dependenciesSimon Ser2019-06-041-39/+20
* Update tcell forkDrew DeVault2019-06-021-0/+2
* Use forked version of tcellDrew DeVault2019-06-011-0/+11
* Update terminal color handling per vterm changesDrew DeVault2019-05-261-0/+2
* Update to the latest go-libvtermDrew DeVault2019-05-261-0/+11
* Update go-libvtermDrew DeVault2019-05-261-0/+2
* Fix special characters in address.PersonalNameDrew DeVault2019-05-251-0/+2
* Update go-imap and go-imap-idleSimon Ser2019-05-191-14/+11
* Implement :reply -q and :reply -aDrew DeVault2019-05-161-0/+2
* Implement (basic form) of :replyDrew DeVault2019-05-161-0/+2
* Copy sent emails to the Sent folderDrew DeVault2019-05-151-0/+2
* Implement sending emails /o/Drew DeVault2019-05-141-0/+2
* Add :send-message, prepares & writes email to /tmpDrew DeVault2019-05-141-0/+5
* Update go-imap to 1.0.0-beta.4Simon Ser2019-04-291-38/+22
* go get git.sr.ht/~sircmpwn/go-libvtermElias Naur2019-04-211-0/+2
* Add basic filter implementationDrew DeVault2019-03-311-0/+6
* Implement :pipeDrew DeVault2019-03-301-0/+2
* Add body fetching support codeDrew DeVault2019-03-291-0/+4
* Improve cursor handling in embedded terminalDrew DeVault2019-03-211-0/+6
* Fix cursor handling in embedded terminalDrew DeVault2019-03-211-0/+2
n class="p">.data, line_info.dataB = line:find('([^'..Fold..']*)'..Fold..'([^'..Fold..']*)') else line_info.data = line end table.insert(result, line_info) end end end if #result == 0 then table.insert(result, {mode='text', data=''}) end return result end function save_to_disk(State) local outfile = App.open_for_writing(State.filename) if outfile == nil then error('failed to write to "'..State.filename..'"') end for _,line in ipairs(State.lines) do if line.mode == 'drawing' then store_drawing(outfile, line) else outfile:write(line.data) if line.dataB and #line.dataB > 0 then outfile:write(Fold) outfile:write(line.dataB) end outfile:write('\n') end end outfile:close() end function load_drawing(infile_next_line) local drawing = {mode='drawing', h=256/2, points={}, shapes={}, pending={}} while true do local line = infile_next_line() assert(line) if line == '```' then break end local shape = json.decode(line) if shape.mode == 'freehand' then -- no changes needed elseif shape.mode == 'line' or shape.mode == 'manhattan' then local name = shape.p1.name shape.p1 = Drawing.find_or_insert_point(drawing.points, shape.p1.x, shape.p1.y, --[[large width to minimize overlap]] 1600) drawing.points[shape.p1].name = name name = shape.p2.name shape.p2 = Drawing.find_or_insert_point(drawing.points, shape.p2.x, shape.p2.y, --[[large width to minimize overlap]] 1600) drawing.points[shape.p2].name = name elseif shape.mode == 'polygon' or shape.mode == 'rectangle' or shape.mode == 'square' then for i,p in ipairs(shape.vertices) do local name = p.name shape.vertices[i] = Drawing.find_or_insert_point(drawing.points, p.x,p.y, --[[large width to minimize overlap]] 1600) drawing.points[shape.vertices[i]].name = name end elseif shape.mode == 'circle' or shape.mode == 'arc' then local name = shape.center.name shape.center = Drawing.find_or_insert_point(drawing.points, shape.center.x,shape.center.y, --[[large width to minimize overlap]] 1600) drawing.points[shape.center].name = name elseif shape.mode == 'deleted' then -- ignore else print(shape.mode) assert(false) end table.insert(drawing.shapes, shape) end return drawing end function store_drawing(outfile, drawing) outfile:write('```lines\n') for _,shape in ipairs(drawing.shapes) do if shape.mode == 'freehand' then outfile:write(json.encode(shape), '\n') elseif shape.mode == 'line' or shape.mode == 'manhattan' then local line = json.encode({mode=shape.mode, p1=drawing.points[shape.p1], p2=drawing.points[shape.p2]}) outfile:write(line, '\n') elseif shape.mode == 'polygon' or shape.mode == 'rectangle' or shape.mode == 'square' then local obj = {mode=shape.mode, vertices={}} for _,p in ipairs(shape.vertices) do table.insert(obj.vertices, drawing.points[p]) end local line = json.encode(obj) outfile:write(line, '\n') elseif shape.mode == 'circle' then outfile:write(json.encode({mode=shape.mode, center=drawing.points[shape.center], radius=shape.radius}), '\n') elseif shape.mode == 'arc' then outfile:write(json.encode({mode=shape.mode, center=drawing.points[shape.center], radius=shape.radius, start_angle=shape.start_angle, end_angle=shape.end_angle}), '\n') elseif shape.mode == 'deleted' then -- ignore else print(shape.mode) assert(false) end end outfile:write('```\n') end -- for tests function load_array(a) local result = {} local next_line = ipairs(a) local i,line,drawing = 0, '' while true do i,line = next_line(a, i) if i == nil then break end --? print(line) if line == '```lines' then -- inflexible with whitespace since these files are always autogenerated --? print('inserting drawing') i, drawing = load_drawing_from_array(next_line, a, i) --? print('i now', i) table.insert(result, drawing) else --? print('inserting text') local line_info = {mode='text'} if line:find(Fold) then _, _, line_info.data, line_info.dataB = line:find('([^'..Fold..']*)'..Fold..'([^'..Fold..']*)') else line_info.data = line end table.insert(result, line_info) end end if #result == 0 then table.insert(result, {mode='text', data=''}) end return result end function load_drawing_from_array(iter, a, i) local drawing = {mode='drawing', h=256/2, points={}, shapes={}, pending={}} local line while true do i, line = iter(a, i) assert(i) --? print(i) if line == '```' then break end local shape = json.decode(line) if shape.mode == 'freehand' then -- no changes needed elseif shape.mode == 'line' or shape.mode == 'manhattan' then local name = shape.p1.name shape.p1 = Drawing.find_or_insert_point(drawing.points, shape.p1.x, shape.p1.y, --[[large width to minimize overlap]] 1600) drawing.points[shape.p1].name = name name = shape.p2.name shape.p2 = Drawing.find_or_insert_point(drawing.points, shape.p2.x, shape.p2.y, --[[large width to minimize overlap]] 1600) drawing.points[shape.p2].name = name elseif shape.mode == 'polygon' or shape.mode == 'rectangle' or shape.mode == 'square' then for i,p in ipairs(shape.vertices) do local name = p.name shape.vertices[i] = Drawing.find_or_insert_point(drawing.points, p.x,p.y, --[[large width to minimize overlap]] 1600) drawing.points[shape.vertices[i]].name = name end elseif shape.mode == 'circle' or shape.mode == 'arc' then local name = shape.center.name shape.center = Drawing.find_or_insert_point(drawing.points, shape.center.x,shape.center.y, --[[large width to minimize overlap]] 1600) drawing.points[shape.center].name = name elseif shape.mode == 'deleted' then -- ignore else print(shape.mode) assert(false) end table.insert(drawing.shapes, shape) end return i, drawing end function is_absolute_path(path) local os_path_separator = package.config:sub(1,1) if os_path_separator == '/' then -- POSIX systems permit backslashes in filenames return path:sub(1,1) == '/' elseif os_path_separator == '\\' then if path:sub(2,2) == ':' then return true end -- DOS drive letter followed by volume separator local f = path:sub(1,1) return f == '/' or f == '\\' else error('What OS is this? LÖVE reports that the path separator is "'..os_path_separator..'"') end end function is_relative_path(path) return not is_absolute_path(path) end function dirname(path) local os_path_separator = package.config:sub(1,1) if os_path_separator == '/' then -- POSIX systems permit backslashes in filenames return path:match('.*/') or './' elseif os_path_separator == '\\' then return path:match('.*[/\\]') or './' else error('What OS is this? LÖVE reports that the path separator is "'..os_path_separator..'"') end end function test_dirname() check_eq(dirname('a/b'), 'a/', 'F - test_dirname') check_eq(dirname('x'), './', 'F - test_dirname/current') end function basename(path) local os_path_separator = package.config:sub(1,1) if os_path_separator == '/' then -- POSIX systems permit backslashes in filenames return string.gsub(path, ".*/(.*)", "%1") elseif os_path_separator == '\\' then return string.gsub(path, ".*[/\\](.*)", "%1") else error('What OS is this? LÖVE reports that the path separator is "'..os_path_separator..'"') end end function empty(h) for _,_ in pairs(h) do return false end return true end