Options
The Options dialog holds every setting pb-diff has. Groups are listed down the left; clicking a group shows its options. The defaults let you start without visiting this dialog. Open it when a comparison shows something you want to handle differently. It opens from Tools ▸ Options.
Pressing OK applies the options at once. A change to how files are compared, such as ignoring whitespace, case or comments, or how PowerBuilder objects are parsed, compares the open tabs again. A tab holding merge decisions that are not saved yet is left as it is, and the status bar says to press F5 when you are ready; you are asked before the decisions are discarded.
The options are kept in settings.json, per user or
beside a portable copy; Settings and
profile files says where, what else pb-diff remembers, and what
happens to a file edited by hand. Only the desktop application reads
them: pb-diff-cli takes its compare options from the
switches on each command.
General
| Option | What it does | Default |
|---|---|---|
| Prompt for confirmation on application exit | Asks before closing pb-diff. Independently of this setting, a three-way merge whose result you have not saved always asks, on closing the application and on closing its tab: this option is about the general habit of being asked, not about losing work. | Off |
| Reopen the comparison left open, and the last file selection | When pb-diff starts with nothing else to do, reopens the comparison
that was in front when you last closed it: two files come back as a File Compare, two libraries or a longer
selection as a Compare Summary. A
comparison whose tab you closed before exiting does not come back, and
neither does one a source-control client opened with -SDI.
The same option makes a File Selection
open on the lists you left there. |
On |
| Automatically load last three-way compare | Starts the start-up sheet's three-way merge below on the last
File1, Base and File2. Kept in last-threeway.txt,
separately from Recent, so clearing Recent does not touch
it. |
On |
| Start-up sheet | What pb-diff opens when it is launched with nothing to do. None leaves the window empty with a line saying how to start; File Selection opens a File Selection tab, on the selection you left there; Three-Way Compare starts a three-way merge: on the last three files when they are all still there, and otherwise in New Comparison, set to three-way and filled with what was remembered. | None |
| Display a warning if files are identical | When a File Selection or a pair of libraries is compared and the two turn out to be the same, the Compare Summary says so above an empty list. A File Compare of two identical files always says so in its status bar, whatever this option. | On |
| Show only changed items when a comparison opens | Opens every File Compare, three-way merge and Compare Summary with Only Changed Items on, so the tree or the grid shows what changed. Off, they open showing everything. It decides only where a new tab starts: the toggle still changes the tab in front, and the tabs already open keep their state when you press OK. Only Changed Lines always opens off. | On |
Two of those settings can open something and so can the command line, so they are consulted in one order: files named on the command line first, then the comparison left open, then the start-up sheet. A shortcut or a source-control client that names files therefore never has to argue with a setting.
The start-up sheet defaults to None. The shell starts empty with a line of text saying how to begin; a dialog appears at launch only when the reader asks for one here.
Appearance
| Option | What it does | Default |
|---|---|---|
| Application theme | System follows the Windows setting and changes with it; Light and Dark fix it. Accepting Options applies the choice at once, including to tabs that are already open, and the title bar follows. | System |
| Change highlights | The five change colours: New, Modified, Deleted, Empty (the padding opposite an addition or a deletion) and Excluded (text an ignore option removed from the comparison). They reach the row shading, the status markers and the change minimap together. Marker shapes stay distinguishable whatever you choose here. See the Status Icon Legend. | Pale green, amber, red, grey, lilac |
| Underline and strike through in-line changes | Adds underline and strikethrough to the character-level highlighting inside a modified line, on top of the colour: what the old side lost is struck through, what the new side gained is underlined. It applies in the compare panes and in the HTML rendition of a report. It does not reach the PDF, RTF, CSV or JSON renditions: those carry no character-level marking at all, so a report you print carries the change colours but not the rules. | On |
| Full modified line compare in the detailed display | Renders every modified line as a full line compare rather than a plain highlight: the character engine marks the characters that moved instead of the whole token they sit in. This is more precise but also noisier. It applies wherever a modified line is drawn, including the File Compare, a compare opened from a summary, and both panes of a three-way merge. Changing it takes effect on the next compare, which is what F5 is for. | Off |
| Syntax colours | The colour of each token class, one row per class as the dialog spells it: Keyword, Type, Identifier, String, Number, Comment, Operator, Punctuation, Directive, Attribute, TagName, AttributeValue and Text. The Language box above the rows chooses what they are being set for. All languages is what every language gets; selecting PowerScript, DataWindow, XML, HTML, JavaScript, INI or plain text sets colours only for that language. A language says nothing about a class until you give it something, so a keyword can be one colour in a DataWindow definition and another in PowerScript without either affecting the rest. Four choices are offered in the Syntax theme box above the grid. Follow the application scheme is the default: it colours the code for the page it is drawn on, taking the dark set in a dark application and the light set in a light one. The other three select a specific palette: Classic, Light or Dark. They apply on either page, including combinations that are hard to read. Individual classes can then be overridden on top of whichever is chosen. Change highlighting always composes over syntax colouring: the change state is the background, the token class is the text colour. | Follow the application scheme |
Each syntax theme can be used as supplied or adjusted by token class and language.
Folder locations
| Option | What it does | Default |
|---|---|---|
| Selection files | Where the Save and Open dialogs for .pbdiff-sel
selection files start. |
Not set |
| Command files | Where a command file named without a folder is looked for. A command
file holds command-line arguments and is passed as @name.
The current folder is searched first and this one second, so a name that
means something where the application was started keeps meaning it. See
Command line. |
Not set |
| Favourites | Folders you keep coming back to. They are added to Windows' own list of places, down the side of the file dialogs pb-diff opens: the Browse… buttons of New Comparison, opening a library, a saved selection or a saved report, choosing a folder to export objects into, browsing for the files of a three-way merge, and saving a merge, a selection or a report. A folder five levels down a build tree is then one click away rather than six. Add and remove them here; a favourite whose folder no longer exists is left out rather than offered and broken. The folder pickers on this page do not carry them, which is deliberate: choosing where a favourite lives should not be steered by the favourites. | Empty |
Window settings
| Option | What it does |
|---|---|
| Reset the main window | pb-diff remembers the size, position and maximised state of its window between sessions, including the non-maximised size. This forgets them, which is the cure for a window that has been left off-screen or at an unusable size. |
| Reset print preview | The same for the print preview window, which is the only other window with a placement of its own. |
| Reset Document pane layouts | Forgets where each kind of tab's splitters were left, including the three-way merge's tree, merged pane and actions list, the File Compare's hierarchy column, the Line Compare's division between its inputs and result, and how the versions of a File Compare and of a three-way merge divide their width. Every tab then opens at its built-in proportions again. Use this when a splitter has been dragged somewhere you cannot reach it. |
Comparisons are tabs, not windows, so there is no size or position to reset for them. What a tab does remember is where its splitters were left: drag them where you want them and the next tab of that kind opens the same way, this session or next week. A width remembered on a wide monitor is not restored into a narrower one that could not show it.
Text settings
| Option | What it does | Default |
|---|---|---|
| Editor font and size | The font of the compare panes. The picker puts monospaced fonts first: code compared in a proportional font is hard to align by eye and harder to read column positions in. Sizes from 6 to 32 point are accepted; anything outside is clamped rather than refused, because a size out of range is a slip and not a decision. | Consolas 10 pt |
| Tab size (columns) | How far a tab runs in the compare panes. This is the same setting as Tab Size in PowerBuilder's own source editor, and it has the same default, so PowerScript indented in the IDE lines up here without changing anything. A tab advances to the next stop rather than standing for a fixed number of spaces, which is what keeps a block of code aligned when some lines start with a tab and others do not. Accepted values are 1 to 16. | 3 |
| Navigation tree font and size | The font of the hierarchy tree of the File Compare and the Three-Way Merge, apart from the editor font. Interface font is the font the rest of the window uses; the other families are listed by name. The rows and the status markers grow and shrink with the size, which runs from 6 to 32 point; the expand arrows and the indentation grow less, so that names deep in the tree keep their room. Pressing OK applies it to the comparisons already open. The zoom commands change the compare panes and leave the tree as it is. | Interface font 9 pt |
The tab size affects only what you see. Comparing is done on the text as the file holds it, so changing it never changes which lines are reported as different; and text copied out of a compare pane carries the tabs the author wrote, not the spaces drawn in their place.
Reports follow the same setting, so a printed or exported report indents the way the compare it came from does. The CSV and JSON forms are the exception: they are data rather than a page, and carry the text as the file holds it, tabs included.
View ▸ Zoom In, Zoom Out and Reset Zoom (Ctrl++, Ctrl+-, Ctrl+0) override the size for as long as you are reading. They do not change the setting.
PowerBuilder
| Option | What it does | Default |
|---|---|---|
| Object compare type | How a summary compare decides whether an entry changed. Metadata compares size and timestamp, which is fast but will call a re-saved object modified. Binary compares the bytes, which is exact, though a re-export with no semantic change reads as modified. Parsed parses both sides and compares the hierarchies: the slowest, and the only one free of false positives. | Parsed |
| Automatically sync modified function and event names | Pairs a function or event whose signature changed but whose name did not, so that adding a parameter reads as one modification instead of a deletion plus an addition. Switch it off to see signature changes as two separate items. | On |
| Include DataWindow overview | Adds an optional derived overview of processing, units, bands, database columns, controls, update table and Retrieve SQL. It is not source content and does not add another changed item or merge decision. | On |
| Normalise DataWindow attribute name case | Compares attribute names case-insensitively. Different PowerBuilder versions write them differently; without this, an upgrade produces a DataWindow full of differences nobody made. | On |
| Normalise DataWindow unquoted attribute case | The same treatment for unquoted attribute values. Quoted values, the ones that hold real data, are never touched. | On |
Text compare
| Option | What it does | Default |
|---|---|---|
| Ignore whitespace | Ignores whitespace when deciding whether two lines match, so a re-indentation is not a change. The text shown is always the text as it is in the file; only the comparison is affected. | Off |
| Resync distance threshold | How alike two lines must be, on a scale of 0 to 1, before pb-diff will call them a modification of each other rather than a deletion plus an addition. Raise it to stop unrelated lines being paired; lower it to pair more aggressively; 0 disables the check and pairs everything the line alignment offers. | 0.5 |
XML
| Option | What it does | Default |
|---|---|---|
| XML compare type | Whether XML files are compared as Text or Parsed. Parsed reads the document, pretty-prints it into a canonical form and gives it a hierarchy of elements, which is what makes every ignore below possible. Text compares the file as it stands, line against line, with no hierarchy and no ignores, which is what you want when the layout of the file is itself the thing under review. | Parsed |
| Ignore attribute sequence | Sorts attributes before comparing, so reordered attributes are not differences. | Off |
| Ignore namespace definition | Drops xmlns declarations from the comparison. |
Off |
| Ignore namespace prefix | Compares element and attribute names without their prefix, so a
document that renamed ns1: to x: throughout
reads as unchanged. |
Off |
| Ignore XML comments | Leaves XML comments out of the comparison. | Off |
| Ignore CData blocks | Leaves CDATA sections out of the comparison. | Off |
| Ignore element sequence | Keys sibling elements by their content instead of by the position they were written in, so an element that moved is found on both sides and pairs with itself rather than reading as a deletion and an addition somewhere else. Siblings with equal content keep the document's order, so an element that moved and changed still pairs with the sibling of its rank. Needs XML compare type: Parsed, since there are no elements to key in a text compare. | Off |
Text that an ignore removed from the comparison is still displayed; it is shaded with the Excluded colour so that you can see it was not compared.
JavaScript
| Option | What it does | Default |
|---|---|---|
| Parse JavaScript functions as separate items | Locates the functions in a .js file and shows each as
its own item in the hierarchy, instead of comparing the file as one
block of text. |
On |
| Strict JavaScript parsing | Keeps only the functions the parser did not have to guess at: it must have a name, and its body must end at a closing brace the parser matched. A single-expression arrow, an anonymous callback or a function whose braces do not balance is not made into an item. What it rejects is not lost: that code stays in the top-level block and is compared there, so strict shows less structure and never less code. It has no effect unless the option above is on. | Off |