Changeset 294fc3cc in mainline for uspace/app/edit/edit.c
- Timestamp:
- 2021-09-25T18:47:29Z (4 years ago)
- Branches:
- master, serial, ticket/834-toolchain-update, topic/msim-upgrade, topic/simplify-dev-export
- Children:
- 45b7d4d
- Parents:
- c1c7c20
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
uspace/app/edit/edit.c
rc1c7c20 r294fc3cc 156 156 static pane_t pane; 157 157 158 static sysarg_t scr_rows;159 static sysarg_t scr_columns;160 161 158 #define ROW_BUF_SIZE 4096 162 159 #define BUF_SIZE 64 … … 269 266 (void) pane_row_display; 270 267 271 // console_get_size(con, &scr_columns, &scr_rows);272 scr_columns = 80;273 scr_rows = 25;274 275 pane.rows = scr_rows - 1;276 pane.columns = scr_columns;277 268 pane.sh_row = 1; 278 269 pane.sh_column = 1; … … 310 301 /* Move to beginning of file. */ 311 302 pt_get_sof(&sof); 312 caret_move(sof, true, true);313 303 314 304 /* Create UI */ … … 316 306 if (rc != EOK) 317 307 return 1; 308 309 caret_move(sof, true, true); 318 310 319 311 /* Initial display */ … … 363 355 ui_wnd_params_init(¶ms); 364 356 params.caption = "Text Editor"; 365 params.rect.p0.x = 0; 366 params.rect.p0.y = 0; 367 params.rect.p1.x = 80; 368 params.rect.p1.y = 25; 357 params.style &= ~ui_wds_decorated; 358 params.placement = ui_wnd_place_full_screen; 369 359 370 360 rc = ui_window_create(edit->ui, ¶ms, &edit->window); … … 1291 1281 /* If it already fits, we're done */ 1292 1282 n = str_width(text); 1293 if ( n <= scr_columns - 2)1283 if ((int)n <= pane->columns - 2) 1294 1284 break; 1295 1285 1296 1286 /* Compute number of excess characters */ 1297 nextra = n - ( scr_columns - 2);1287 nextra = n - (pane->columns - 2); 1298 1288 /** With of the file name part */ 1299 1289 fnw = str_width(fname);
Note:
See TracChangeset
for help on using the changeset viewer.