From 60a6d68b8806768740fc5c19f82add73f5750cd3 Mon Sep 17 00:00:00 2001 From: mitchell <70453897+667e-11@users.noreply.github.com> Date: Thu, 27 Nov 2014 11:27:57 -0500 Subject: Small code cleanup. --- core/ui.lua | 5 +---- properties.lua | 6 ++++-- 2 files changed, 5 insertions(+), 6 deletions(-) diff --git a/core/ui.lua b/core/ui.lua index f8607392..4574fca0 100644 --- a/core/ui.lua +++ b/core/ui.lua @@ -182,10 +182,7 @@ end -- @name goto_file function ui.goto_file(filename, split, preferred_view, sloppy) local patt = '^'..filename..'$' - if sloppy then - local i = filename:reverse():find('[/\\]%.?%.?') -- ./ or ../ - patt = i and filename:sub(-i + 1, -1)..'$' or filename..'$' - end + if sloppy then patt = filename:match('[^/\\]+$')..'$' end if #_VIEWS == 1 and split and not (view.buffer.filename or ''):find(patt) then view:split() else diff --git a/properties.lua b/properties.lua index 5ad9a388..1525e6c2 100644 --- a/properties.lua +++ b/properties.lua @@ -162,5 +162,7 @@ buffer.fold_flags = not CURSES and buffer.FOLDFLAG_LINEAFTER_CONTRACTED or 0 --buffer.wrap_start_indent = -- Long Lines. ---buffer.edge_mode = not CURSES and buffer.EDGE_LINE or buffer.EDGE_BACKGROUND ---buffer.edge_column = 80 +--if buffer ~= ui.command_entry then +-- buffer.edge_mode = not CURSES and buffer.EDGE_LINE or buffer.EDGE_BACKGROUND +-- buffer.edge_column = 80 +--end -- cgit v1.2.3