Skip to content

bug: diffs show trailing newline differences #923

Description

@mschrage

There's an annoying bug where Q chat shows diffs for files it modifies, but the last line of the diff always has (what i'm guessing is) a newline difference, so it clutters the context, and also I have to scroll up to actually see what the real change was.

Example:

 73, 73:     local role_name="$1"
  74, 74:     
  75, 75:     # Validate environment
  76, 76:     if ! validate_environment; then
  77, 77:         echo "Error: Invalid environment configuration" >&2
  78, 78:         return 1
  79, 79:     fi
  80, 80:     
  81, 81:     # Export role-specific variables
  82, 82:     export QDT_ROLE="$role_name"
  83, 83:     export QDT_ROLE_SCRIPT_DIR="$QDT_SCRIPT_DIR"
  84, 84:     
  85, 85:     return 0
  86, 86: }
  87, 87: 
  88, 88: # Main initialization
  89, 89: if [[ "${BASH_SOURCE[0]}" == "${0}" ]]; then
  90, 90:     echo "This script should be sourced, not executed directly" >&2
  91, 91:     exit 1
- 92    : fi
+     92: fi

Activity

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

No one assigned

    Labels

    Type

    No type

    Projects

    No projects

      Milestone

      No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions