mirror of
https://github.com/kovidgoyal/kitty.git
synced 2026-02-01 11:34:59 +01:00
Now we do the rewrap of history and line buffers together. This is faster and deals with multiline chars split between the two buffers correctly. Also, considerably simpler code.
26 lines
613 B
C
26 lines
613 B
C
/*
|
|
* resize.h
|
|
* Copyright (C) 2024 Kovid Goyal <kovid at kovidgoyal.net>
|
|
*
|
|
* Distributed under terms of the GPL3 license.
|
|
*/
|
|
|
|
#pragma once
|
|
#include "line-buf.h"
|
|
#include "history.h"
|
|
|
|
typedef struct TrackCursor {
|
|
index_type x, y;
|
|
index_type dest_x, dest_y;
|
|
bool is_sentinel;
|
|
} TrackCursor;
|
|
|
|
typedef struct ResizeResult {
|
|
LineBuf *lb; HistoryBuf *hb;
|
|
bool ok;
|
|
index_type num_content_lines_before, num_content_lines_after;
|
|
} ResizeResult;
|
|
|
|
ResizeResult
|
|
resize_screen_buffers(LineBuf *lb, HistoryBuf *hb, index_type lines, index_type columns, ANSIBuf *as_ansi_buf, TrackCursor *cursors);
|