Remove reset_locator
[deliverable/binutils-gdb.git] / gdb / tui / tui-layout.c
1 /* TUI layout window management.
2
3 Copyright (C) 1998-2019 Free Software Foundation, Inc.
4
5 Contributed by Hewlett-Packard Company.
6
7 This file is part of GDB.
8
9 This program is free software; you can redistribute it and/or modify
10 it under the terms of the GNU General Public License as published by
11 the Free Software Foundation; either version 3 of the License, or
12 (at your option) any later version.
13
14 This program is distributed in the hope that it will be useful,
15 but WITHOUT ANY WARRANTY; without even the implied warranty of
16 MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
17 GNU General Public License for more details.
18
19 You should have received a copy of the GNU General Public License
20 along with this program. If not, see <http://www.gnu.org/licenses/>. */
21
22 #include "defs.h"
23 #include "arch-utils.h"
24 #include "command.h"
25 #include "symtab.h"
26 #include "frame.h"
27 #include "source.h"
28 #include <ctype.h>
29
30 #include "tui/tui.h"
31 #include "tui/tui-data.h"
32 #include "tui/tui-windata.h"
33 #include "tui/tui-wingeneral.h"
34 #include "tui/tui-stack.h"
35 #include "tui/tui-regs.h"
36 #include "tui/tui-win.h"
37 #include "tui/tui-winsource.h"
38 #include "tui/tui-disasm.h"
39 #include "tui/tui-layout.h"
40 #include "gdb_curses.h"
41
42 /*******************************
43 ** Static Local Decls
44 ********************************/
45 static void show_layout (enum tui_layout_type);
46 static void show_source_or_disasm_and_command (enum tui_layout_type);
47 static struct tui_win_info *make_command_window (int, int);
48 static struct tui_win_info *make_source_window (int, int);
49 static struct tui_win_info *make_disasm_window (int, int);
50 static void show_source_command (void);
51 static void show_disasm_command (void);
52 static void show_source_disasm_command (void);
53 static void show_data (enum tui_layout_type);
54 static enum tui_layout_type next_layout (void);
55 static enum tui_layout_type prev_layout (void);
56 static void tui_layout_command (const char *, int);
57 static void extract_display_start_addr (struct gdbarch **, CORE_ADDR *);
58
59
60 /***************************************
61 ** DEFINITIONS
62 ***************************************/
63
64 #define LAYOUT_USAGE "Usage: layout prev | next | <layout_name> \n"
65
66 /* Show the screen layout defined. */
67 static void
68 show_layout (enum tui_layout_type layout)
69 {
70 enum tui_layout_type cur_layout = tui_current_layout ();
71
72 if (layout != cur_layout)
73 {
74 /* Since the new layout may cause changes in window size, we
75 should free the content and reallocate on next display of
76 source/asm. */
77 tui_clear_source_windows ();
78 if (layout == SRC_DATA_COMMAND
79 || layout == DISASSEM_DATA_COMMAND)
80 {
81 show_data (layout);
82 tui_refresh_all ();
83 }
84 else
85 {
86 /* First make the current layout be invisible. */
87 tui_make_all_invisible ();
88 tui_make_invisible (tui_locator_win_info_ptr ());
89
90 switch (layout)
91 {
92 /* Now show the new layout. */
93 case SRC_COMMAND:
94 show_source_command ();
95 tui_add_to_source_windows (TUI_SRC_WIN);
96 break;
97 case DISASSEM_COMMAND:
98 show_disasm_command ();
99 tui_add_to_source_windows (TUI_DISASM_WIN);
100 break;
101 case SRC_DISASSEM_COMMAND:
102 show_source_disasm_command ();
103 tui_add_to_source_windows (TUI_SRC_WIN);
104 tui_add_to_source_windows (TUI_DISASM_WIN);
105 break;
106 default:
107 break;
108 }
109 }
110 }
111 }
112
113
114 /* Function to set the layout to SRC_COMMAND, DISASSEM_COMMAND,
115 SRC_DISASSEM_COMMAND, SRC_DATA_COMMAND, or DISASSEM_DATA_COMMAND. */
116 enum tui_status
117 tui_set_layout (enum tui_layout_type layout_type)
118 {
119 enum tui_status status = TUI_SUCCESS;
120
121 if (layout_type != UNDEFINED_LAYOUT)
122 {
123 enum tui_layout_type cur_layout = tui_current_layout ();
124 struct gdbarch *gdbarch;
125 CORE_ADDR addr;
126 struct tui_win_info *win_with_focus = tui_win_with_focus ();
127 struct tui_layout_def *layout_def = tui_layout_def ();
128
129 extract_display_start_addr (&gdbarch, &addr);
130
131 enum tui_layout_type new_layout = layout_type;
132
133 if (new_layout != cur_layout)
134 {
135 show_layout (new_layout);
136
137 /* Now determine where focus should be. */
138 if (win_with_focus != TUI_CMD_WIN)
139 {
140 switch (new_layout)
141 {
142 case SRC_COMMAND:
143 tui_set_win_focus_to (TUI_SRC_WIN);
144 layout_def->display_mode = SRC_WIN;
145 break;
146 case DISASSEM_COMMAND:
147 /* The previous layout was not showing code.
148 This can happen if there is no source
149 available:
150
151 1. if the source file is in another dir OR
152 2. if target was compiled without -g
153 We still want to show the assembly though! */
154
155 tui_get_begin_asm_address (&gdbarch, &addr);
156 tui_set_win_focus_to (TUI_DISASM_WIN);
157 layout_def->display_mode = DISASSEM_WIN;
158 break;
159 case SRC_DISASSEM_COMMAND:
160 /* The previous layout was not showing code.
161 This can happen if there is no source
162 available:
163
164 1. if the source file is in another dir OR
165 2. if target was compiled without -g
166 We still want to show the assembly though! */
167
168 tui_get_begin_asm_address (&gdbarch, &addr);
169 if (win_with_focus == TUI_SRC_WIN)
170 tui_set_win_focus_to (TUI_SRC_WIN);
171 else
172 tui_set_win_focus_to (TUI_DISASM_WIN);
173 break;
174 case SRC_DATA_COMMAND:
175 if (win_with_focus != TUI_DATA_WIN)
176 tui_set_win_focus_to (TUI_SRC_WIN);
177 else
178 tui_set_win_focus_to (TUI_DATA_WIN);
179 layout_def->display_mode = SRC_WIN;
180 break;
181 case DISASSEM_DATA_COMMAND:
182 /* The previous layout was not showing code.
183 This can happen if there is no source
184 available:
185
186 1. if the source file is in another dir OR
187 2. if target was compiled without -g
188 We still want to show the assembly though! */
189
190 tui_get_begin_asm_address (&gdbarch, &addr);
191 if (win_with_focus != TUI_DATA_WIN)
192 tui_set_win_focus_to (TUI_DISASM_WIN);
193 else
194 tui_set_win_focus_to (TUI_DATA_WIN);
195 layout_def->display_mode = DISASSEM_WIN;
196 break;
197 default:
198 break;
199 }
200 }
201 /*
202 * Now update the window content.
203 */
204 tui_update_source_windows_with_addr (gdbarch, addr);
205 if (new_layout == SRC_DATA_COMMAND
206 || new_layout == DISASSEM_DATA_COMMAND)
207 tui_show_registers (TUI_DATA_WIN->current_group);
208 }
209 }
210 else
211 status = TUI_FAILURE;
212
213 return status;
214 }
215
216 /* Add the specified window to the layout in a logical way. This
217 means setting up the most logical layout given the window to be
218 added. */
219 void
220 tui_add_win_to_layout (enum tui_win_type type)
221 {
222 enum tui_layout_type cur_layout = tui_current_layout ();
223
224 switch (type)
225 {
226 case SRC_WIN:
227 if (cur_layout != SRC_COMMAND
228 && cur_layout != SRC_DISASSEM_COMMAND
229 && cur_layout != SRC_DATA_COMMAND)
230 {
231 tui_clear_source_windows_detail ();
232 if (cur_layout == DISASSEM_DATA_COMMAND)
233 show_layout (SRC_DATA_COMMAND);
234 else
235 show_layout (SRC_COMMAND);
236 }
237 break;
238 case DISASSEM_WIN:
239 if (cur_layout != DISASSEM_COMMAND
240 && cur_layout != SRC_DISASSEM_COMMAND
241 && cur_layout != DISASSEM_DATA_COMMAND)
242 {
243 tui_clear_source_windows_detail ();
244 if (cur_layout == SRC_DATA_COMMAND)
245 show_layout (DISASSEM_DATA_COMMAND);
246 else
247 show_layout (DISASSEM_COMMAND);
248 }
249 break;
250 case DATA_WIN:
251 if (cur_layout != SRC_DATA_COMMAND
252 && cur_layout != DISASSEM_DATA_COMMAND)
253 {
254 if (cur_layout == DISASSEM_COMMAND)
255 show_layout (DISASSEM_DATA_COMMAND);
256 else
257 show_layout (SRC_DATA_COMMAND);
258 }
259 break;
260 default:
261 break;
262 }
263 }
264
265
266 /* Answer the height of a window. If it hasn't been created yet,
267 answer what the height of a window would be based upon its type and
268 the layout. */
269 int
270 tui_default_win_height (enum tui_win_type type,
271 enum tui_layout_type layout)
272 {
273 int h;
274
275 if (tui_win_list[type] != NULL)
276 h = tui_win_list[type]->height;
277 else
278 {
279 switch (layout)
280 {
281 case SRC_COMMAND:
282 case DISASSEM_COMMAND:
283 if (TUI_CMD_WIN == NULL)
284 h = tui_term_height () / 2;
285 else
286 h = tui_term_height () - TUI_CMD_WIN->height;
287 break;
288 case SRC_DISASSEM_COMMAND:
289 case SRC_DATA_COMMAND:
290 case DISASSEM_DATA_COMMAND:
291 if (TUI_CMD_WIN == NULL)
292 h = tui_term_height () / 3;
293 else
294 h = (tui_term_height () - TUI_CMD_WIN->height) / 2;
295 break;
296 default:
297 h = 0;
298 break;
299 }
300 }
301
302 return h;
303 }
304
305
306 /* Answer the height of a window. If it hasn't been created yet,
307 answer what the height of a window would be based upon its type and
308 the layout. */
309 int
310 tui_default_win_viewport_height (enum tui_win_type type,
311 enum tui_layout_type layout)
312 {
313 int h;
314
315 h = tui_default_win_height (type, layout);
316
317 if (tui_win_list[type] == TUI_CMD_WIN)
318 h -= 1;
319 else
320 h -= 2;
321
322 return h;
323 }
324
325 /* Complete possible layout names. TEXT is the complete text entered so
326 far, WORD is the word currently being completed. */
327
328 static void
329 layout_completer (struct cmd_list_element *ignore,
330 completion_tracker &tracker,
331 const char *text, const char *word)
332 {
333 static const char *layout_names [] =
334 { "src", "asm", "split", "regs", "next", "prev", NULL };
335
336 complete_on_enum (tracker, layout_names, text, word);
337 }
338
339 /* Function to initialize gdb commands, for tui window layout
340 manipulation. */
341
342 void
343 _initialize_tui_layout (void)
344 {
345 struct cmd_list_element *cmd;
346
347 cmd = add_com ("layout", class_tui, tui_layout_command, _("\
348 Change the layout of windows.\n\
349 Usage: layout prev | next | LAYOUT-NAME\n\
350 Layout names are:\n\
351 src : Displays source and command windows.\n\
352 asm : Displays disassembly and command windows.\n\
353 split : Displays source, disassembly and command windows.\n\
354 regs : Displays register window. If existing layout\n\
355 is source/command or assembly/command, the \n\
356 register window is displayed. If the\n\
357 source/assembly/command (split) is displayed, \n\
358 the register window is displayed with \n\
359 the window that has current logical focus."));
360 set_cmd_completer (cmd, layout_completer);
361 }
362
363
364 /*************************
365 ** STATIC LOCAL FUNCTIONS
366 **************************/
367
368
369 /* Function to set the layout to SRC, ASM, SPLIT, NEXT, PREV, DATA, or
370 REGS. */
371 enum tui_status
372 tui_set_layout_by_name (const char *layout_name)
373 {
374 enum tui_status status = TUI_SUCCESS;
375
376 if (layout_name != NULL)
377 {
378 int i;
379 enum tui_layout_type new_layout = UNDEFINED_LAYOUT;
380 enum tui_layout_type cur_layout = tui_current_layout ();
381
382 std::string copy = layout_name;
383 for (i = 0; i < copy.size (); i++)
384 copy[i] = toupper (copy[i]);
385 const char *buf_ptr = copy.c_str ();
386
387 /* First check for ambiguous input. */
388 if (strlen (buf_ptr) <= 1 && *buf_ptr == 'S')
389 {
390 warning (_("Ambiguous command input."));
391 status = TUI_FAILURE;
392 }
393 else
394 {
395 if (subset_compare (buf_ptr, "SRC"))
396 new_layout = SRC_COMMAND;
397 else if (subset_compare (buf_ptr, "ASM"))
398 new_layout = DISASSEM_COMMAND;
399 else if (subset_compare (buf_ptr, "SPLIT"))
400 new_layout = SRC_DISASSEM_COMMAND;
401 else if (subset_compare (buf_ptr, "REGS"))
402 {
403 if (cur_layout == SRC_COMMAND
404 || cur_layout == SRC_DATA_COMMAND)
405 new_layout = SRC_DATA_COMMAND;
406 else
407 new_layout = DISASSEM_DATA_COMMAND;
408 }
409 else if (subset_compare (buf_ptr, "NEXT"))
410 new_layout = next_layout ();
411 else if (subset_compare (buf_ptr, "PREV"))
412 new_layout = prev_layout ();
413 else
414 status = TUI_FAILURE;
415
416 if (status == TUI_SUCCESS)
417 {
418 /* Make sure the curses mode is enabled. */
419 tui_enable ();
420 tui_set_layout (new_layout);
421 }
422 }
423 }
424 else
425 status = TUI_FAILURE;
426
427 return status;
428 }
429
430
431 static void
432 extract_display_start_addr (struct gdbarch **gdbarch_p, CORE_ADDR *addr_p)
433 {
434 enum tui_layout_type cur_layout = tui_current_layout ();
435 struct gdbarch *gdbarch = get_current_arch ();
436 CORE_ADDR addr;
437 CORE_ADDR pc;
438 struct symtab_and_line cursal = get_current_source_symtab_and_line ();
439
440 switch (cur_layout)
441 {
442 case SRC_COMMAND:
443 case SRC_DATA_COMMAND:
444 gdbarch = TUI_SRC_WIN->gdbarch;
445 find_line_pc (cursal.symtab,
446 TUI_SRC_WIN->start_line_or_addr.u.line_no,
447 &pc);
448 addr = pc;
449 break;
450 case DISASSEM_COMMAND:
451 case SRC_DISASSEM_COMMAND:
452 case DISASSEM_DATA_COMMAND:
453 gdbarch = TUI_DISASM_WIN->gdbarch;
454 addr = TUI_DISASM_WIN->start_line_or_addr.u.addr;
455 break;
456 default:
457 addr = 0;
458 break;
459 }
460
461 *gdbarch_p = gdbarch;
462 *addr_p = addr;
463 }
464
465
466 static void
467 tui_layout_command (const char *arg, int from_tty)
468 {
469 /* Switch to the selected layout. */
470 if (tui_set_layout_by_name (arg) != TUI_SUCCESS)
471 warning (_("Invalid layout specified.\n%s"), LAYOUT_USAGE);
472 }
473
474 /* Answer the previous layout to cycle to. */
475 static enum tui_layout_type
476 next_layout (void)
477 {
478 int new_layout;
479
480 new_layout = tui_current_layout ();
481 if (new_layout == UNDEFINED_LAYOUT)
482 new_layout = SRC_COMMAND;
483 else
484 {
485 new_layout++;
486 if (new_layout == UNDEFINED_LAYOUT)
487 new_layout = SRC_COMMAND;
488 }
489
490 return (enum tui_layout_type) new_layout;
491 }
492
493
494 /* Answer the next layout to cycle to. */
495 static enum tui_layout_type
496 prev_layout (void)
497 {
498 int new_layout;
499
500 new_layout = tui_current_layout ();
501 if (new_layout == SRC_COMMAND)
502 new_layout = DISASSEM_DATA_COMMAND;
503 else
504 {
505 new_layout--;
506 if (new_layout == UNDEFINED_LAYOUT)
507 new_layout = DISASSEM_DATA_COMMAND;
508 }
509
510 return (enum tui_layout_type) new_layout;
511 }
512
513
514
515 static struct tui_win_info *
516 make_command_window (int height, int origin_y)
517 {
518 struct tui_win_info *result = new tui_cmd_window ();
519 result->reset (height, tui_term_width (), 0, origin_y);
520 tui_make_window (result, DONT_BOX_WINDOW);
521 return result;
522 }
523
524
525 /* make_source_window().
526 */
527 static struct tui_win_info *
528 make_source_window (int height, int origin_y)
529 {
530 tui_win_info *result = new tui_source_window ();
531 result->reset (height, tui_term_width (), 0, origin_y);
532 result->make_visible (true);
533 return result;
534 }
535
536
537 /* make_disasm_window().
538 */
539 static struct tui_win_info *
540 make_disasm_window (int height, int origin_y)
541 {
542 tui_win_info *result = new tui_disasm_window ();
543 result->reset (height, tui_term_width (), 0, origin_y);
544 result->make_visible (true);
545 return result;
546 }
547
548
549 static tui_win_info *
550 make_data_window (int height, int origin_y)
551 {
552 tui_win_info *result = new tui_data_window ();
553 result->reset (height, tui_term_width (), 0, origin_y);
554 result->make_visible (true);
555 return result;
556 }
557
558
559
560 /* Show the Source/Command layout. */
561 static void
562 show_source_command (void)
563 {
564 show_source_or_disasm_and_command (SRC_COMMAND);
565 }
566
567
568 /* Show the Dissassem/Command layout. */
569 static void
570 show_disasm_command (void)
571 {
572 show_source_or_disasm_and_command (DISASSEM_COMMAND);
573 }
574
575
576 /* Show the Source/Disassem/Command layout. */
577 static void
578 show_source_disasm_command (void)
579 {
580 if (tui_current_layout () != SRC_DISASSEM_COMMAND)
581 {
582 int cmd_height, src_height, asm_height;
583
584 if (TUI_CMD_WIN != NULL)
585 cmd_height = TUI_CMD_WIN->height;
586 else
587 cmd_height = tui_term_height () / 3;
588
589 src_height = (tui_term_height () - cmd_height) / 2;
590 asm_height = tui_term_height () - (src_height + cmd_height);
591
592 if (TUI_SRC_WIN == NULL)
593 tui_win_list[SRC_WIN] = make_source_window (src_height, 0);
594 else
595 {
596 TUI_SRC_WIN->reset (src_height,
597 tui_term_width (),
598 0,
599 0);
600 tui_make_visible (TUI_SRC_WIN);
601 TUI_SRC_WIN->m_has_locator = false;
602 }
603
604 struct tui_locator_window *locator = tui_locator_win_info_ptr ();
605 gdb_assert (locator != nullptr);
606
607 tui_show_source_content (TUI_SRC_WIN);
608 if (TUI_DISASM_WIN == NULL)
609 {
610 tui_win_list[DISASSEM_WIN]
611 = make_disasm_window (asm_height, src_height - 1);
612 locator->reset (2 /* 1 */ ,
613 tui_term_width (),
614 0,
615 (src_height + asm_height) - 1);
616 }
617 else
618 {
619 locator->reset (2 /* 1 */ ,
620 tui_term_width (),
621 0,
622 (src_height + asm_height) - 1);
623 TUI_DISASM_WIN->m_has_locator = true;
624 TUI_DISASM_WIN->reset (asm_height,
625 tui_term_width (),
626 0,
627 src_height - 1);
628 tui_make_visible (TUI_DISASM_WIN);
629 }
630 TUI_SRC_WIN->m_has_locator = false;
631 TUI_DISASM_WIN->m_has_locator = true;
632 tui_make_visible (locator);
633 tui_show_locator_content ();
634 tui_show_source_content (TUI_DISASM_WIN);
635
636 if (TUI_CMD_WIN == NULL)
637 tui_win_list[CMD_WIN]
638 = make_command_window (cmd_height, tui_term_height () - cmd_height);
639 else
640 {
641 TUI_CMD_WIN->reset (TUI_CMD_WIN->height,
642 TUI_CMD_WIN->width,
643 0,
644 TUI_CMD_WIN->origin.y);
645 tui_make_visible (TUI_CMD_WIN);
646 }
647 tui_set_current_layout_to (SRC_DISASSEM_COMMAND);
648 }
649 }
650
651
652 /* Show the Source/Data/Command or the Dissassembly/Data/Command
653 layout. */
654 static void
655 show_data (enum tui_layout_type new_layout)
656 {
657 int total_height = (tui_term_height () - TUI_CMD_WIN->height);
658 int src_height, data_height;
659 enum tui_win_type win_type;
660
661 struct tui_locator_window *locator = tui_locator_win_info_ptr ();
662 gdb_assert (locator != nullptr);
663
664 data_height = total_height / 2;
665 src_height = total_height - data_height;
666 tui_make_all_invisible ();
667 tui_make_invisible (locator);
668 if (tui_win_list[DATA_WIN] == nullptr)
669 tui_win_list[DATA_WIN] = make_data_window (data_height, 0);
670 else
671 tui_win_list[DATA_WIN]->reset (data_height, tui_term_width (), 0, 0);
672 tui_win_list[DATA_WIN]->make_visible (true);
673
674 if (new_layout == SRC_DATA_COMMAND)
675 win_type = SRC_WIN;
676 else
677 win_type = DISASSEM_WIN;
678
679 tui_source_window_base *base;
680 if (tui_win_list[win_type] == NULL)
681 {
682 if (win_type == SRC_WIN)
683 tui_win_list[win_type]
684 = make_source_window (src_height, data_height - 1);
685 else
686 tui_win_list[win_type]
687 = make_disasm_window (src_height, data_height - 1);
688 locator->reset (2 /* 1 */ ,
689 tui_term_width (),
690 0,
691 total_height - 1);
692 base = (tui_source_window_base *) tui_win_list[win_type];
693 }
694 else
695 {
696 base = (tui_source_window_base *) tui_win_list[win_type];
697 tui_win_list[win_type]->reset (src_height,
698 tui_term_width (),
699 0,
700 data_height - 1);
701 tui_make_visible (tui_win_list[win_type]);
702 locator->reset (2 /* 1 */ ,
703 tui_term_width (),
704 0,
705 total_height - 1);
706 }
707 base->m_has_locator = true;
708 tui_make_visible (locator);
709 tui_show_locator_content ();
710 tui_add_to_source_windows
711 ((tui_source_window_base *) tui_win_list[win_type]);
712 tui_set_current_layout_to (new_layout);
713 }
714
715 void
716 tui_gen_win_info::reset (int height_, int width_,
717 int origin_x_, int origin_y_)
718 {
719 int h = height_;
720
721 width = width_;
722 height = h;
723 if (h > 1)
724 {
725 viewport_height = h - 1;
726 if (type != CMD_WIN)
727 viewport_height--;
728 }
729 else
730 viewport_height = 1;
731 origin.x = origin_x_;
732 origin.y = origin_y_;
733 }
734
735 /* Show the Source/Command or the Disassem layout. */
736 static void
737 show_source_or_disasm_and_command (enum tui_layout_type layout_type)
738 {
739 if (tui_current_layout () != layout_type)
740 {
741 struct tui_win_info **win_info_ptr;
742 int src_height, cmd_height;
743 struct tui_locator_window *locator = tui_locator_win_info_ptr ();
744 gdb_assert (locator != nullptr);
745
746 if (TUI_CMD_WIN != NULL)
747 cmd_height = TUI_CMD_WIN->height;
748 else
749 cmd_height = tui_term_height () / 3;
750 src_height = tui_term_height () - cmd_height;
751
752 if (layout_type == SRC_COMMAND)
753 win_info_ptr = &tui_win_list[SRC_WIN];
754 else
755 win_info_ptr = &tui_win_list[DISASSEM_WIN];
756
757 tui_source_window_base *base;
758 if ((*win_info_ptr) == NULL)
759 {
760 if (layout_type == SRC_COMMAND)
761 *win_info_ptr = make_source_window (src_height - 1, 0);
762 else
763 *win_info_ptr = make_disasm_window (src_height - 1, 0);
764 locator->reset (2 /* 1 */ ,
765 tui_term_width (),
766 0,
767 src_height - 1);
768 base = (tui_source_window_base *) *win_info_ptr;
769 }
770 else
771 {
772 base = (tui_source_window_base *) *win_info_ptr;
773 locator->reset (2 /* 1 */ ,
774 tui_term_width (),
775 0,
776 src_height - 1);
777 base->m_has_locator = true;
778 (*win_info_ptr)->reset (src_height - 1,
779 tui_term_width (),
780 0,
781 0);
782 tui_make_visible (*win_info_ptr);
783 }
784
785 base->m_has_locator = true;
786 tui_make_visible (locator);
787 tui_show_locator_content ();
788 tui_show_source_content (base);
789
790 if (TUI_CMD_WIN == NULL)
791 {
792 tui_win_list[CMD_WIN] = make_command_window (cmd_height,
793 src_height);
794 }
795 else
796 {
797 TUI_CMD_WIN->reset (TUI_CMD_WIN->height,
798 TUI_CMD_WIN->width,
799 TUI_CMD_WIN->origin.x,
800 TUI_CMD_WIN->origin.y);
801 tui_make_visible (TUI_CMD_WIN);
802 }
803 tui_set_current_layout_to (layout_type);
804 }
805 }
This page took 0.047847 seconds and 4 git commands to generate.