add a __tostring method to every object (#1534)
* added a stupid __tostring to every object * moved every __tostring to just after the :extend() call --------- Co-authored-by: Adam <adamdharrison@gmail.com> (cherry picked from commit 880e7f1fa1521cdf176f44627a27c901e187058e)
This commit is contained in:
@@ -9,6 +9,8 @@ local View = require "core.view"
|
||||
---@class plugins.projectsearch.resultsview : core.view
|
||||
local ResultsView = View:extend()
|
||||
|
||||
function ResultsView:__tostring() return "ResultsView" end
|
||||
|
||||
ResultsView.context = "session"
|
||||
|
||||
function ResultsView:new(path, text, fn)
|
||||
@@ -237,7 +239,6 @@ function ResultsView:draw()
|
||||
self:draw_scrollbar()
|
||||
end
|
||||
|
||||
|
||||
---@param path string
|
||||
---@param text string
|
||||
---@param fn fun(line_text:string):...
|
||||
|
||||
@@ -8,6 +8,7 @@ local View = require "core.view"
|
||||
|
||||
local ToolbarView = View:extend()
|
||||
|
||||
function ToolbarView:__tostring() return "ToolbarView" end
|
||||
|
||||
function ToolbarView:new()
|
||||
ToolbarView.super.new(self)
|
||||
|
||||
@@ -38,6 +38,8 @@ end
|
||||
|
||||
local TreeView = View:extend()
|
||||
|
||||
function TreeView:__tostring() return "TreeView" end
|
||||
|
||||
function TreeView:new()
|
||||
TreeView.super.new(self)
|
||||
self.scrollable = true
|
||||
|
||||
Reference in New Issue
Block a user