diff --git a/src/internal/model.go b/src/internal/model.go index ec8503bb..79fea408 100644 --- a/src/internal/model.go +++ b/src/internal/model.go @@ -51,6 +51,8 @@ func (m model) Init() tea.Cmd { // Update function for bubble tea to provide internal communication to the // application func (m model) Update(msg tea.Msg) (tea.Model, tea.Cmd) { + slog.Debug("model.Update() called. ", "msg", msg, "current width", m.fullWidth, + "current height", m.fullHeight) var cmd tea.Cmd switch msg := msg.(type) { @@ -95,6 +97,7 @@ func (m *model) handleChannelMessage(msg channelMessage) { // Adjust window size based on msg information func (m *model) handleWindowResize(msg tea.WindowSizeMsg) { + slog.Debug("model.Update() called with handleWindowResize msg.", "msg.Width", msg.Width, "msg.Height", msg.Height) m.fullHeight = msg.Height m.fullWidth = msg.Width @@ -296,6 +299,7 @@ func (m *model) warnModalForQuit() { // Implement View function for bubble tea model to handle visualization. func (m model) View() string { + slog.Debug("model.View() called.", "h", m.fullHeight, "w", m.fullWidth) panel := m.fileModel.filePanels[m.filePanelFocusIndex] // check is the terminal size enough if m.fullHeight < minimumHeight || m.fullWidth < minimumWidth {