OSDN Git Service
(root)
/
hengbandforosx
/
hengbandosx.git
/ commitdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
| commitdiff |
tree
raw
|
patch
| inline |
side by side
(parent:
6d037dc
)
[Feature] show_file 関数で表示する内容をウィンドウの中央に表示する
author
Habu
<habu1010+github@gmail.com>
Sun, 22 Jan 2023 05:11:50 +0000
(14:11 +0900)
committer
Habu
<habu1010+github@gmail.com>
Sun, 22 Jan 2023 05:16:34 +0000
(14:16 +0900)
show_file で表示する内容は横幅 80 桁が想定されているので、横方向に対して中央に表示
する。縦方向はウィンドウ幅いっぱいを使用する。
src/core/show-file.cpp
patch
|
blob
|
history
diff --git
a/src/core/show-file.cpp
b/src/core/show-file.cpp
index
307dd3f
..
9b23fb0
100644
(file)
--- a/
src/core/show-file.cpp
+++ b/
src/core/show-file.cpp
@@
-133,6
+133,8
@@
static void show_file_aux_line(concptr str, int cy, concptr shower)
*/
bool show_file(PlayerType *player_ptr, bool show_version, concptr name, concptr what, int line, BIT_FLAGS mode)
{
+ TermCenteredOffsetSetter tcos(MAIN_TERM_MIN_COLS, std::nullopt);
+
int wid, hgt;
term_get_size(&wid, &hgt);