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:
ThaCuber
2025-05-18 22:54:38 +08:00
committed by takase1121
parent fdd5ab8ed0
commit ce16538903
17 changed files with 35 additions and 9 deletions
+2 -1
View File
@@ -11,6 +11,8 @@ local View = require "core.view"
---@field super core.view
local DocView = View:extend()
function DocView:__tostring() return "DocView" end
DocView.context = "session"
local function move_to_line_offset(dv, line, col, offset)
@@ -591,5 +593,4 @@ function DocView:draw()
self:draw_scrollbar()
end
return DocView