Author Topic: Float window macro  (Read 929 times)

Graeme

  • Senior Community Member
  • Posts: 2391
  • Hero Points: 315
Float window macro
« on: October 18, 2014, 03:19:22 pm »
I wrote the following macro to give me a new floating edit window.  I have "multiple files share window" enabled so if I just call float-window, the main mdi is left with no edit window.  So I first create a second window, then call float-window.  Normally I have doc tabs not showing - there's only one of them.  The result of calling vsplit-window is that both windows then have doc tabs showing but I can tolerate that.  I use the zoom-window command to turn the doc-tabs on / off  - is there any other command for turning these on/off?

The size of the new floating window I think is the same as the size before it was floated and the position of the new window seems to always be a fixed place  - which for me, means the window is half off the screen.  Is there any way to get the new window to be a particular size and position - e.g. the size and position when I last did save-default-layout ?

Code: [Select]
_command void my_float_window() name_info(','VSARG2_REQUIRES_EDITORCTL|VSARG2_READ_ONLY)
{
   vsplit_window();
   float_window();
}