Uploaded image for project: 'Forge: Jansi'
  1. Forge: Jansi
  2. JANSI-5

WindowsAnsiOutputStream.processAttributeRest() should respect original console colors

    Details

    • Type: Enhancement
    • Status: Resolved
    • Priority: Major
    • Resolution: Done
    • Labels:
      None
    • Environment:

      Windows

      Description

      The current implementation of WindowsAnsiOutputStream.processAttributeRest() always resets to a white foreground on a black background. If the command shell doesn't have those color settings, the result is really ugly (see screenshot). Fortunately the fix is easy after JANSI-4: just use the originalColors value instead. The method then becomes this:

          @Override
          protected void processAttributeRest() throws IOException {
              info.attributes = (short)((info.attributes & ~0x00FF ) | originalColors);
              applyAttribute();
          }
      

      Could you please change the code to use the originalColors value instead of a hardcoded color combination? Thanks!

        Gliffy Diagrams

          Attachments

            Activity

              People

              • Assignee:
                chirino Hiram Chirino
                Reporter:
                jkuipers Joris Kuipers
              • Votes:
                0 Vote for this issue
                Watchers:
                0 Start watching this issue

                Dates

                • Created:
                  Updated:
                  Resolved: