Loading ...
Sorry, an error occurred while loading the content.

confirm(), maximum entries

Expand Messages
  • Ralf Arens
    Hi, I just noticed that the menu, which confirm() opens in the GUI version, takes only up to ten entries. (At least in Vim-5.6a, Linux, GTK+.) This can cause
    Message 1 of 2 , Mar 11, 2000
    • 0 Attachment
      Hi,

      I just noticed that the menu, which confirm() opens in the GUI
      version, takes only up to ten entries. (At least in Vim-5.6a, Linux,
      GTK+.)

      This can cause some problems. I wrote a function which Ispell's a
      single word and asks the user via confirm() which alternative he/she
      wants to take. If Ispell has more than nine alternatives (I need one
      for "Leave unchanged") the rest won't displayed. It works correctly in
      the console version. (Just for your information why this is
      important.)

      Personally I have no problem with that, I don't use the GUI. But
      others, who prefer the GUI (and use my function ;-), can have
      problems.

      Could this behavior be changed? Exists this problem in other GUIs? Or
      did I make a mistake?


      Ciao,
      Ralf

      --
      Don't believe in magic; understand what your libraries do,
      how they do it, and at what cost they do it.
      -- Bjarne Stroustrup
    • Bram Moolenaar
      ... All GUIs have a maximum of ten buttons. ... You can change the sources: #define MAXBUT 10 to use a bigger number. I don t know what the dialog will look
      Message 2 of 2 , Mar 20, 2000
      • 0 Attachment
        Ralf Arens wrote:

        > I just noticed that the menu, which confirm() opens in the GUI
        > version, takes only up to ten entries. (At least in Vim-5.6a, Linux,
        > GTK+.)

        All GUIs have a maximum of ten buttons.

        > This can cause some problems. I wrote a function which Ispell's a
        > single word and asks the user via confirm() which alternative he/she
        > wants to take. If Ispell has more than nine alternatives (I need one
        > for "Leave unchanged") the rest won't displayed. It works correctly in
        > the console version. (Just for your information why this is
        > important.)
        >
        > Personally I have no problem with that, I don't use the GUI. But
        > others, who prefer the GUI (and use my function ;-), can have
        > problems.
        >
        > Could this behavior be changed? Exists this problem in other GUIs? Or
        > did I make a mistake?

        You can change the sources:

        #define MAXBUT 10

        to use a bigger number. I don't know what the dialog will look like, might be
        ugly...

        I could raise the maximum to 50, but I'm not sure if this causes any problems
        for some GUI.

        --
        hundred-and-one symptoms of being an internet addict:
        198. You read all the quotes at Netaholics Anonymous and keep thinking
        "What's wrong with that?"

        /-/-- Bram Moolenaar --- Bram@... --- http://www.moolenaar.net --\-\
        \-\-- Vim: http://www.vim.org ---- ICCF Holland: http://www.vim.org/iccf --/-/
      Your message has been successfully submitted and would be delivered to recipients shortly.